-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from CrisBRM/more-english-fixes
More english fixes
- Loading branch information
Showing
6 changed files
with
66 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
# Crypto Design Doc | ||
|
||
Similar to Bitcoin and Ethereum, Nebulas also adopts elliptic curve algorithm as its basic encryption algorithm for Nebulas transactions. Users' private key will be encrypted with user's passphrases and stored in keystore. | ||
Similar to Bitcoin and Ethereum, Nebulas also adopted an elliptic curve algorithm as its basic encryption algorithm for Nebulas transactions. Users' private keys will be encrypted with their passphrases and stored in a keystore. | ||
|
||
## Hash | ||
|
||
Support generic hash functions, like sha256, sha3256 and ripemd160 etc. | ||
Supports generic hash functions, like sha256, sha3256 and ripemd160 etc. | ||
|
||
## Keystore | ||
|
||
Nebulas Keystore are designed to manage user's keys. | ||
The Nebulas Keystore is designed to manage users' keys. | ||
|
||
### Key | ||
|
||
The Key interface is designed to support various keys, including symmetric keys and asymmetric keys. | ||
|
||
### Provider | ||
|
||
Keystore provide different methods to save keys, such as `memory_provider` and `persistence_provider`. Before saved, key has been encrypted in keystore. | ||
The Keystore provides different methods to save keys, such as `memory_provider` and `persistence_provider`. Before storage, the key has been encrypted in the keystore. | ||
|
||
* `memory provider`: This type of provider keep keys in memory. After the key has been encrypted with the passphrase when user setkey or load, it is cached in memory provider. | ||
* `persistence provider`: This type of provider serialize the encrypted key to the file. The file is compatible with the ethereum's keystore file,users can back up the address with its privatekey in it. | ||
* `memory provider`: This type of provider keeps the keys in memory. After the key has been encrypted with the passphrase when the user setkey or loads, it is cached in memory provider. | ||
* `persistence provider`: This type of provider serializes the encrypted key to the file. The file is compatible with Ethereum's keystore file. Users can back up the address with its privatekey in it. | ||
|
||
### Signature | ||
|
||
The Signature interface is used to provide applications the functionality of a digital signature algorithm. A Signature object can be used to generate and verify digital signatures. | ||
The Signature interface is used to provide applications with the functionality of a digital signature algorithm. A Signature object can be used to generate and verify digital signatures. | ||
|
||
There are two phases to use a Signature object for either signing data : | ||
There are two phases, in order to use a Signature object for signing data : | ||
|
||
* Initialization: with a private key, which initializes the signature for signing \(see initSign\(\) in the source code of go-nebulas\). | ||
* Signing on all input bytes. | ||
* Signing of all input bytes. | ||
|
||
A Signature object can recover the public key with a signatrue and the plain text was singed on\(see function RecoverSignerFromSignature in go-nebulas\). So just comparing the from address and the address derived from the public key can verfiy a transaction | ||
A Signature object can recover the public key with a signature and the plain text that was signed \(see function RecoverSignerFromSignature in go-nebulas\). So just comparing the from address and the address derived from the public key can verify a transaction | ||
|
||
> Similar as [Android Keystore](https://developer.android.com/training/articles/keystore.html), TPM, TEE and hardware low level security protection will be supported as a provider later. | ||
> Similar to the [Android Keystore](https://developer.android.com/training/articles/keystore.html), TPM, TEE and hardware low level security protection will be supported as a provider later. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters