Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
46ebf59
k256 signature verification tests
maurolacy Feb 3, 2021
4844da9
Update lock files
maurolacy Feb 4, 2021
b98047c
Add secp256k1_verify to Api
maurolacy Feb 5, 2021
81d87de
Optimize required features
maurolacy Feb 6, 2021
eddb092
Revert "Add secp256k1_verify to Api"
maurolacy Feb 6, 2021
c5e9443
Add verify_secp256k1 native
maurolacy Feb 7, 2021
ccd44ec
Add ed25519_verify impl / test
maurolacy Feb 5, 2021
44e5f3a
Use slices instead of arrays for compat
maurolacy Feb 5, 2021
f1b86e2
Qualify ed25519 usage / imports
maurolacy Feb 5, 2021
879962c
Update lock files
maurolacy Feb 5, 2021
ff72db4
Simplify signature deserialization
maurolacy Feb 7, 2021
8d41b3a
Don't hash ed25519 message
maurolacy Feb 7, 2021
d4442ae
Improve syntax / variable names
maurolacy Feb 7, 2021
ebb6c46
Add Cosmos ed25519 signature tests
maurolacy Feb 7, 2021
f9bfdfd
Add comments / improve test constants names
maurolacy Feb 7, 2021
8143929
Add extra Cosmos ed25519 signature verification tests
maurolacy Feb 7, 2021
9b20a45
Add ed25519_verify to Api trait
maurolacy Feb 8, 2021
b01e2ac
Add verify_ed25519 VM import
maurolacy Feb 8, 2021
0f85f5d
Rename verify imports params / errors for clarity
maurolacy Feb 8, 2021
f0434f8
Fix rebase errors
maurolacy Feb 8, 2021
9b7df09
Move ed25519_verify to crypto crate
maurolacy Feb 11, 2021
015e852
Fix rebase
maurolacy Feb 11, 2021
a7aac0b
Update lock files
maurolacy Feb 12, 2021
f601f65
ed25519_verify returns bool
maurolacy Feb 12, 2021
c7d38b5
Add ed25519 checks / limits
maurolacy Feb 12, 2021
a0365c9
Add ed25519 native api tests
maurolacy Feb 12, 2021
63299ac
Add verify_ed25519 native
maurolacy Feb 12, 2021
3ead8f8
Fix ed25519_verify signature
maurolacy Feb 12, 2021
1950ed6
Add ed25519_verify MockApi impl
maurolacy Feb 12, 2021
c0ce241
Add (mock) API ed25519 (basic) tests
maurolacy Feb 12, 2021
d2c90ab
Update crypto-verify lock file
maurolacy Feb 14, 2021
9169eab
Add ed25519_verify documentation
maurolacy Feb 16, 2021
4ff7a7b
Update crypto package README.md
maurolacy Feb 16, 2021
f1bffbd
Update README.md / CHANGELOG.md
maurolacy Feb 16, 2021
67cadd1
Adapt ed25519_verify to VerificationError
maurolacy Feb 17, 2021
0543093
Add ed25519_verify to Api trait
maurolacy Feb 8, 2021
fe424b2
Add ed25519 checks / limits
maurolacy Feb 12, 2021
bb560d8
Add (mock) API ed25519 (basic) tests
maurolacy Feb 12, 2021
81e1624
Add crypto-verify contract ed25519 support
maurolacy Feb 14, 2021
5bc28fc
Add ed25519 integration tests
maurolacy Feb 14, 2021
075be09
Update schema
maurolacy Feb 14, 2021
b0e3630
Remove duplicate tests (rebase errors)
maurolacy Feb 17, 2021
accf545
Adapt crypto-verify contract ed25519 support to VerificationError
maurolacy Feb 17, 2021
da0b7c3
Remove redundant import
maurolacy Feb 17, 2021
b47a968
Improve results handling, add comments
maurolacy Feb 17, 2021
88ea312
Increase max message size to 128KiB
maurolacy Feb 17, 2021
c834dbf
Refactor crypto.rs into secp256k1.rs and ed25519.rs
maurolacy Feb 17, 2021
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
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ and this project adheres to

### Added

- cosmwasm-crypto: Add new crypto-related crate. Add `secp256k1_verify`, ECDSA
secp256k1 signature verification scheme for Cosmos signature formats. ([#780])
- cosmwasm-crypto: Add `ed25519_verify`, EdDSA ed25519 signature verification
scheme for Tendermint signature and public key formats. ([#771])
- cosmwasm-crypto: New crypto-related crate. Add `secp256k1_verify`, ECDSA
secp256k1 signature verification scheme for Cosmos signature and public key
formats. ([#780])
- cosmwasm-vm: Add PinnedMemoryCache. ([#696])
- cosmwasm-vm: The new `Cache::analyze` provides a static analyzis of the Wasm
bytecode. This is used to tell the caller if the contract exposes IBC entry
Expand Down
28 changes: 28 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ extern "C" {
/// greater than 1 in case of error.
fn secp256k1_verify(message_hash_ptr: u32, signature_ptr: u32, public_key_ptr: u32) -> u32;

/// verifies a message against a signature with a public key, using the
/// ed25519 EdDSA scheme.
/// Returns 1 on verification success and 0 on failure.
fn ed25519_verify(message_ptr: u32, signature_ptr: u32, public_key_ptr: u32) -> u32;

/// Executes a query on the chain (import). Not to be confused with the
/// query export, which queries the state of the contract.
fn query_chain(request: u32) -> u32;
Expand Down
28 changes: 28 additions & 0 deletions contracts/burner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions contracts/crypto-verify/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 46 additions & 2 deletions contracts/crypto-verify/schema/query_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"title": "QueryMsg",
"anyOf": [
{
"description": "Cosmos format (secp256k1 verification scheme).",
"type": "object",
"required": [
"verify_signature"
"verify_cosmos_signature"
],
"properties": {
"verify_signature": {
"verify_cosmos_signature": {
"type": "object",
"required": [
"message",
Expand Down Expand Up @@ -44,6 +45,49 @@
}
}
},
{
"description": "Tendermint format (ed25519 verification scheme).",
"type": "object",
"required": [
"verify_tendermint_signature"
],
"properties": {
"verify_tendermint_signature": {
"type": "object",
"required": [
"message",
"public_key",
"signature"
],
"properties": {
"message": {
"description": "Message to verify.",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"public_key": {
"description": "Serialized public key. Tendermint format (32 bytes).",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"signature": {
"description": "Serialized signature. Tendermint format (64 bytes).",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
}
}
}
}
},
{
"description": "Returns a list of supported verification schemes. No pagination - this is a short list.",
"type": "object",
Expand Down
Loading