Questions tagged [key-generator]

103 questions
18
votes
5 answers

Generate RSA key pair in javascript, based on a password

As far as I understand, RSA keys are usually generated based on a (strong) random generator. Instead, I want to create them based on a password. Or rather on its hash, for example sha512(sha512(password+salt)+password+pepper) This needs to be done…
Sheldon Pinkman
  • 1,086
  • 4
  • 15
  • 21
15
votes
3 answers

How to generate PKCS#1 RSA keys in PEM Format?

Sorry for my english and honestly I have a very little understanding on this so please bear with me. I am developing a java application that sends a signed request to a Server. To do so, I have to generate a PKCS#1 RSA key pair in PEM format for…
Johne Altamera
  • 204
  • 1
  • 2
  • 7
10
votes
1 answer

Partial Key Verification

This question goes out to those of you who have experience with the partial key verification technique for software protection. I'm trying to understand how PKV is better than other keygen schemes, and after reading the much-referenced…
user2233125
9
votes
1 answer

Android KeyPairGenerator always generates the same key pair

I am making an application which generates a key pair for a user. But in every device the keys are identical. Here is my code: public KeyPair generateKeys() { KeyPair keyPair = null; try { // get instance of rsa cipher …
M.Veli
  • 519
  • 1
  • 6
  • 15
8
votes
1 answer

Why KeyPairGenerator.genKeyPair() so slow

I have some Java code and when I run function KeyPairGenerator.genKayPair() it's work 40 seconds or more. How change this situation? If I run openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout server.key -out cert.pem it's work 3…
k_zaur_k
  • 400
  • 1
  • 6
  • 16
7
votes
1 answer

How to generate key using KeyGenerator for FingerPrint API in Android

I am trying to implement the FingerPrint API for my application. I am following the Google's Fingerprint Dialog sample for this purpose. It works fine if compileSdkVersion=23 and minSdkVersion=23 but my application's compileSdkVersion is 21 and…
7
votes
1 answer

What exactly does specifying "AES" as the algorithm in KeyGenerator.getInstance() do?

I'm confused as to why I need to specify an algorithm such as "AES" when generating a key for encryption, e.g... KeyGenerator kg = KeyGenerator.getInstance("AES"); It clearly is not used for specifying the size of the key since AES keys can be 128,…
d60402
  • 3,190
  • 2
  • 23
  • 28
6
votes
4 answers

Generating license keys for my python app

this is my first time ever making full python app with tkinter and wanting to distribute it. I've been searching the net, but I cant quite figure out how to make a license key for my application, as in I want a unique key I give to certain people…
coderoftheday
  • 1,987
  • 4
  • 7
  • 21
5
votes
4 answers

Getting 1 byte extra in the modulus RSA Key and sometimes for exponents also

Here is my code snippet: int eValue = 79, t; int bitLength = 1024; // KeySize BigInteger e = new BigInteger(Integer.toString(eValue)); KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA"); kpg.initialize(bitLength); KeyPair kp =…
Pawan
  • 1,503
  • 2
  • 19
  • 28
5
votes
1 answer

How to add GeneratedKey to config.properties file?

I'm trying to encrypt & decrypt password and for these generating key so far so good.Now I need to store this key in properties file but when I add the key it look like this : #Tue Nov 01 08:22:52 EET…
Coder ACJHP
  • 1,940
  • 1
  • 20
  • 34
5
votes
2 answers

KeyPairGeneratorSpec replacement with KeyGenParameterSpec.Builder equivalents - Keystore operation failed

The following method is deprecated KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA", "AndroidKeyStore"); KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(this) .setAlias(alias) …
CQM
  • 42,592
  • 75
  • 224
  • 366
5
votes
2 answers

C RSA key generator

I create a program on a microntroller (which does not run any OS), and I can't find any library in C which can give me a RSA (PKCS#1) key generator (public and private). I suppose that OpenSSH isn't an option because it's link to Linux or Unix. I…
Nicolas Voron
  • 2,916
  • 1
  • 21
  • 35
4
votes
3 answers

how to make a keygen that writes "-" every four letters in C#

I have a quick question. I have a keygen to generate random passwords for my app. It generates capital letters and numbers but I want it to be like in some programs that formats their code like this xxxx-xxxx-xxxx. so far my code is this Random…
mendez
  • 317
  • 3
  • 7
  • 14
4
votes
2 answers

How do I generate a RSA key in Dart?

I'm trying to generate a RSA key using Dart. The problem seems to be in the SecureRandom initiation. Unfortunately the documentation is vague or non-existent. (It literally says use "File" or "Url", neither of which work). Does anyone know how…
Peril Ravine
  • 1,142
  • 8
  • 12
3
votes
0 answers

Android KeyGenerator returns ProviderException

Seen the below Exception when accessing to the device fingerprint sensor. Noticed this issue in only one device Model : vivo 1907 Product : 1907 Device : 1907 SDK Version : 31 Android Version : 12 Code Snippet : private boolean generateKey()…
raj
  • 148
  • 13
1
2 3 4 5 6 7