- Generate Public / Private key pairs
- Manage them
- Encrypt / decrypt
- Sign message
- Recover public key from signature
Frédéric ZINGG
STEP 1: Public key and Private key generation
STEP 2: Private ket encrypted with pin code
STEP 3: Public key and encrypted Private key stored in localStorage
The Private key is never stored without encryption of course.
Below the 5 keys structure stored in localStorage
generatedpublickeys: [
{ publickey: 'key1', encryptedprivatekey: 'encPrivKey1' },
{ publickey: 'key2', encryptedprivatekey: 'encPrivKey2' },
{ publickey: 'key3', encryptedprivatekey: 'encPrivKey3' },
{ publickey: 'key4', encryptedprivatekey: 'encPrivKey4' },
{ publickey: 'key5', encryptedprivatekey: 'encPrivKey5' },
]
src/mixins/crypto-utils.ts
This is where all useful cryptograhics and storage methods used in the app are located.
npm install
npm run dev
npm run build
Run Unit Tests with Vitest
npm run test:unit