these how my educational project is working till now,
First of all, the user need to choose an username and a master password.
When user create a new account, username a RSA-OAEP key pair is generated (according to http://www.w3.org/TR/WebCryptoAPI/#algorithm-overview.
Then, your private key is wrapped with AES-CBC-256 and a derivedKey from your master password. The derivedKey uses PBKDF2 with SHA-256, 256 bits random salt and 100 000 + (random%255) iterations.
When user create a secret The secret is encrypted using AES-GCM-256 with randomly generated intermediate key Finally, this intermediate key is wrapped with users public key.
Any time user want to access a secret, user need to type his/her master password, that will decrypt your private key, that will decrypt the intermediate key that will finally decrypt the secret.
these is how the encryption model is working but i want to build the feature of shared secrets among users & User just need to know the exact username of your friend to share the secret. but i am stuck on it's implementation that how do i work on these feature and share the secrets among users really wants to know that how shared secrets model/algorithm should work in my education project?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…