主权项 |
1. A method comprising:
providing, by a processing device, a user interface in response to receiving a token; receiving a user selection of one of a plurality of security modes via the user interface; in response to a user selection of a first security mode, generating a first cryptographic key based on a pseudo-random number, and a second cryptographic key based on a password of a user; encrypting private data of the user with the first cryptographic key to create wrapped private data; and encrypting the first cryptographic key with the second cryptographic key to create a wrapped pseudo-random cryptographic key; and in response to a user selection of a second security mode, generating a third cryptographic key based on a password of a user; generating an exponent; encrypting the exponent based on the third cryptographic key; generating a fourth cryptographic key based on a time expanding function using the encrypted exponent, wherein the time-expanding function is ge mod p, g is a generator, e is the encrypted exponent, p is a prime number, and mod is a modulo operator; and encrypting private data of the user with the fourth cryptographic key to create wrapped private data, wherein in the second security mode, a time to attack the fourth cryptographic key increases with value of p. |