Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: tracking ed25519 #27

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
194b654
Create ed25519.md
harsh4786 Jan 4, 2023
cbdae92
Update ed25519.md
harsh4786 Jan 4, 2023
c46e57a
Update ed25519.md
harsh4786 Jan 4, 2023
e213016
Update ed25519.md
harsh4786 Jan 5, 2023
854161f
Update ed25519.md
harsh4786 Jan 5, 2023
e8545e5
Update ed25519.md
harsh4786 Jan 5, 2023
58db6a8
Update ed25519.md
harsh4786 Jan 5, 2023
9b3a425
Update ed25519.md
harsh4786 Jan 6, 2023
b68fdbc
Update ed25519.md
harsh4786 Jan 6, 2023
5f9069b
Update ed25519.md
harsh4786 Jan 8, 2023
f4cd90d
Update ed25519.md
harsh4786 Jan 8, 2023
b62b5fd
Update ed25519.md
harsh4786 Jan 8, 2023
c5bf77c
Update ed25519.md
harsh4786 Jan 8, 2023
7afbe88
Update ed25519.md
harsh4786 Jan 8, 2023
b73f670
Create ed25519.md
harsh4786 Jan 8, 2023
7243993
Update ed25519.md
harsh4786 Jan 8, 2023
c7ed9f2
Update ed25519.md
harsh4786 Jan 8, 2023
619cb24
Update ed25519.md
harsh4786 Jan 9, 2023
37b8667
Update ed25519.md
harsh4786 Jan 9, 2023
630ac7d
Update ed25519.md
harsh4786 Jan 9, 2023
f7a61dc
Update ed25519.md
harsh4786 Jan 13, 2023
c66f658
Update ed25519.md
harsh4786 Jan 14, 2023
ca06142
Update ed25519.md
harsh4786 Jan 17, 2023
440c5d6
Update ed25519.md
harsh4786 Jan 17, 2023
bef0f26
Update ed25519.md
harsh4786 Jan 17, 2023
e092062
Update ed25519.md
harsh4786 Jan 25, 2023
f425adf
Update ed25519.md
harsh4786 Jan 26, 2023
2137f74
Update ed25519.md
harsh4786 Jan 27, 2023
ea04e31
Update ed25519.md
harsh4786 Jan 27, 2023
d7af124
Update ed25519.md
harsh4786 Jan 28, 2023
b1f9c2c
Update ed25519.md
harsh4786 Feb 4, 2023
b216ff8
Update ed25519.md
harsh4786 Feb 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update ed25519.md
harsh4786 authored Jan 8, 2023
commit 7afbe88533b8031f25dcc84b310a581445c0b456
8 changes: 4 additions & 4 deletions core/ed25519.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ Ed25519 is a type of EdDSA using SHA-512 and Curve25519 elliptic curve.

## Usage
Solana uses ed25519-dalek library with the edwards representation of Curve25519 the signature verification is done using “verify_restrict” function.
Ed25519 digital signature scheme was standardized in [RFC8032](https://www.rfc-editor.org/rfc/rfc8032). Although the standardization, there are variations in signature verification in different implementations. Some variations have their own custom criteria that are check the validity of the signatures. We have to ensure that the signatures are non-malleable, can be verified in constant time and have abstracted implementation.
Ed25519 digital signature scheme was standardized in [RFC8032](). Although the standardization, there are variations in signature verification in different implementations. Some variations have their own custom criteria that are check the validity of the signatures. We have to ensure that the signatures are non-malleable, can be verified in constant time and have abstracted implementation.

## Structure
Each ed25519 signature is serialized into a fixed 64 byte sized array represented as [u8; 64] in rust. The Publickey is a [u8; 32] in serialized form. The verifier equation is of unbatched type given by R = [s]B - [k]A.
@@ -17,13 +17,13 @@ The scalar is multiplied by the Curves basepoint 'B' to give the publickey.

A = a.B

To generate a signature of a message M, the user first has to generate a random number 'r' and multiply it with the basepoint B resulting in R.
To generate a signature of a message M, the user first has to generate a random nonce 'r' and multiply it with the basepoint B resulting in R.
R = r.B

Then a hash is generated using SHA-512 algorithm and a scalar 'k' is generated from the hash according to RFC-8032
k <- H(R, A, M)
k <-- H(R, A, M)

To generate the final signature 'f', the algorithm computes this S = r + k.a
To generate the final signature, the algorithm computes this f <-- r + k.s and