Skip to content

Commit

Permalink
fix(all): Small things
Browse files Browse the repository at this point in the history
  • Loading branch information
pmerkleplant committed Nov 2, 2023
1 parent bae2027 commit c96aff4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/signatures/ECDSA.sol
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ library ECDSA {
/// - Private key invalid
///
/// @custom:vm vm.sign(uint,bytes32)
/// @custom:invariant Returned signature is non-malleable.
function sign(PrivateKey privKey, bytes memory message)
internal
view
Expand All @@ -203,6 +204,7 @@ library ECDSA {
/// - Private key invalid
///
/// @custom:vm vm.sign(uint,bytes32)
/// @custom:invariant Returned signature is non-malleable.
function sign(PrivateKey privKey, bytes32 digest)
internal
view
Expand All @@ -227,6 +229,7 @@ library ECDSA {
}

// @todo Docs signEthereumSignedMessage
/// @custom:invariant Returned signature is non-malleable.
function signEthereumSignedMessage(PrivateKey privKey, bytes memory message)
internal
view
Expand All @@ -239,6 +242,7 @@ library ECDSA {
}

// @todo Docs signEthereumSignedMessageHash
/// @custom:invariant Returned signature is non-malleable.
function signEthereumSignedMessageHash(PrivateKey privKey, bytes32 digest)
internal
view
Expand Down
2 changes: 2 additions & 0 deletions test/curves/secp256k1/Secp256k1Arithmetic.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ contract Secp256k1ArithmeticTest is Test {
//--------------------------------------------------------------------------
// Test: Utils

// -- modularInverseOf

function testFuzz_modularInverseOf(uint x) public {
vm.assume(x != 0);
vm.assume(x < Secp256k1Arithmetic.P);
Expand Down
2 changes: 2 additions & 0 deletions test/signatures/ECDSA.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ contract ECDSATest is Test {
wrapper.sign(privKey, keccak256(message));
}

// @todo Test property: Signature is non-malleable.

// @todo Test signEthereum...

//--------------------------------------------------------------------------
Expand Down

0 comments on commit c96aff4

Please sign in to comment.