You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The v1.0.0-rc.1 version of go-cose computes the digest of CBOR-encoded signature structure using the golang built-in hash implementations regardless of the implementation of Signer and Verifier.
If someone wants to change the implementation of golang built-in crypto packages (e.g. use openssl based implementation) just for go-cose, they can only change for Signer and Verifier but not the hash implementations.
Proposal: Instead of passing digest to Sign() and Verify(), we should pass content (i.e. raw payload). Thus it matches RFC 8152 section 8.
It also addresses the weird case that Ed25519 passes CBOR-encoded signature structure instead of digest to Signer as Ed25519 requires the content to be processed twice.
The text was updated successfully, but these errors were encountered:
The
v1.0.0-rc.1
version ofgo-cose
computes thedigest
of CBOR-encoded signature structure using the golang built-in hash implementations regardless of the implementation ofSigner
andVerifier
.If someone wants to change the implementation of golang built-in
crypto
packages (e.g. useopenssl
based implementation) just forgo-cose
, they can only change forSigner
andVerifier
but not the hash implementations.Proposal: Instead of passing
digest
toSign()
andVerify()
, we should passcontent
(i.e. raw payload). Thus it matches RFC 8152 section 8.It also addresses the weird case that
Ed25519
passes CBOR-encoded signature structure instead of digest to Signer as Ed25519 requires the content to be processed twice.The text was updated successfully, but these errors were encountered: