feat: Implement Ed25519 signature #421
Draft
Annotations
7 warnings
Cargo clippy:
contracts/src/utils/cryptography/ed25519.rs#L12
[clippy] reported by reviewdog 🐶
warning: type alias `Public` is never used
--> contracts/src/utils/cryptography/ed25519.rs:12:6
|
12 | type Public = PublicKeyBytes;
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Raw Output:
contracts/src/utils/cryptography/ed25519.rs:12:6:w:warning: type alias `Public` is never used
--> contracts/src/utils/cryptography/ed25519.rs:12:6
|
12 | type Public = PublicKeyBytes;
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
__END__
|
Cargo clippy:
contracts/src/utils/cryptography/ed25519.rs#L16
[clippy] reported by reviewdog 🐶
warning: field `public` is never read
--> contracts/src/utils/cryptography/ed25519.rs:17:5
|
16 | pub struct Pair {
| ---- field in this struct
17 | public: VerificationKey,
| ^^^^^^
|
= note: `Pair` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
Raw Output:
contracts/src/utils/cryptography/ed25519.rs:16:12:w:warning: field `public` is never read
--> contracts/src/utils/cryptography/ed25519.rs:17:5
|
16 | pub struct Pair {
| ---- field in this struct
17 | public: VerificationKey,
| ^^^^^^
|
= note: `Pair` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
__END__
|
Cargo clippy:
contracts/src/utils/cryptography/ed25519.rs#L21
[clippy] reported by reviewdog 🐶
warning: associated items `to_raw_vec`, `sign`, and `verify` are never used
--> contracts/src/utils/cryptography/ed25519.rs:28:8
|
21 | impl Pair {
| --------- associated items in this implementation
...
28 | fn to_raw_vec(&self) -> Vec<u8> {
| ^^^^^^^^^^
...
32 | fn sign(&self, message: &[u8]) -> Signature {
| ^^^^
...
36 | fn verify<M: AsRef<[u8]>>(
| ^^^^^^
Raw Output:
contracts/src/utils/cryptography/ed25519.rs:21:1:w:warning: associated items `to_raw_vec`, `sign`, and `verify` are never used
--> contracts/src/utils/cryptography/ed25519.rs:28:8
|
21 | impl Pair {
| --------- associated items in this implementation
...
28 | fn to_raw_vec(&self) -> Vec<u8> {
| ^^^^^^^^^^
...
32 | fn sign(&self, message: &[u8]) -> Signature {
| ^^^^
...
36 | fn verify<M: AsRef<[u8]>>(
| ^^^^^^
__END__
|
Cargo clippy:
contracts/src/utils/cryptography/ed25519.rs#L1
[clippy] reported by reviewdog 🐶
warning: item in documentation is missing backticks
--> contracts/src/utils/cryptography/ed25519.rs:1:42
|
1 | //! Edwards Digital Signature Algorithm (EdDSA) over Curve25519.
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
1 | //! Edwards Digital Signature Algorithm (`EdDSA`) over Curve25519.
| ~~~~~~~
Raw Output:
contracts/src/utils/cryptography/ed25519.rs:1:42:w:warning: item in documentation is missing backticks
--> contracts/src/utils/cryptography/ed25519.rs:1:42
|
1 | //! Edwards Digital Signature Algorithm (EdDSA) over Curve25519.
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
|
1 | //! Edwards Digital Signature Algorithm (`EdDSA`) over Curve25519.
| ~~~~~~~
__END__
|
Cargo clippy:
contracts/src/utils/cryptography/ed25519.rs#L23
[clippy] reported by reviewdog 🐶
warning: this method could have a `#[must_use]` attribute
--> contracts/src/utils/cryptography/ed25519.rs:23:5
|
23 | pub fn seed(&self) -> Seed {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn seed(&self) -> Seed`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
= note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
Raw Output:
contracts/src/utils/cryptography/ed25519.rs:23:5:w:warning: this method could have a `#[must_use]` attribute
--> contracts/src/utils/cryptography/ed25519.rs:23:5
|
23 | pub fn seed(&self) -> Seed {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn seed(&self) -> Seed`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
= note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
__END__
|
Cargo clippy:
contracts/src/utils/cryptography/ed25519.rs#L28
[clippy] reported by reviewdog 🐶
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
--> contracts/src/utils/cryptography/ed25519.rs:28:19
|
28 | fn to_raw_vec(&self) -> Vec<u8> {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `-W clippy::wrong-self-convention` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
Raw Output:
contracts/src/utils/cryptography/ed25519.rs:28:19:w:warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
--> contracts/src/utils/cryptography/ed25519.rs:28:19
|
28 | fn to_raw_vec(&self) -> Vec<u8> {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `-W clippy::wrong-self-convention` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
__END__
|
Cargo clippy:
contracts/src/utils/cryptography/ed25519.rs#L44
[clippy] reported by reviewdog 🐶
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/src/utils/cryptography/ed25519.rs:44:23
|
44 | public.verify(&sig, message.as_ref()).is_ok()
| ^^^^ help: change this to: `sig`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-W clippy::needless-borrow` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`
Raw Output:
contracts/src/utils/cryptography/ed25519.rs:44:23:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> contracts/src/utils/cryptography/ed25519.rs:44:23
|
44 | public.verify(&sig, message.as_ref()).is_ok()
| ^^^^ help: change this to: `sig`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-W clippy::needless-borrow` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`
__END__
|
Loading