Skip to content

Commit

Permalink
more discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Feb 1, 2024
1 parent 20f6ca7 commit aeb2fdb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/cap-0051.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,22 @@ if hashed and truncated similar to how Ethereum addresses are produced. This
space reduction would lower the read/write resource usages as well as
transactions size, for an increase in instruction cost.

#### SEC1 Encoding of Public Key

The proposal specifies the public key to be SEC1 encoded. This encoding is
65-bytes, containing the point coordinates uncompressed, and is the same
encoding used by the existing `recover_key_ecdsa_secp256k1` function.

Most applications using secp256r1 are likely to produce a 72-byte ASN.1 DER encoded public key, which is convertible.

#### Compact Encoding of Signature

The proposal specifies the signature to be encoded as two 32-bit big endian
integers. This encoding is 64-bytes and is the same encoding used by the
existing `recover_key_ecdsa_secp256k1` function.

Most applications using secp256r1 are likely to produce a 70 to 73-byte ASN.1 DER encoded signature, which is convertible.

#### Webauthn / Passkeys

The secp256r1 verify interface is largely motivated by the webauthn use case. Webauthn involves an application registering with a client, that produces a private key, and provides the public key back to the application. The application can then engage the client to sign data that the application can verify using the public key shared earlier.
Expand Down

0 comments on commit aeb2fdb

Please sign in to comment.