feat(eddsa): add support for EdDSA varsigs - and common Ed25519 and Ed448 algorithms
This commit is contained in:
16
common.go
16
common.go
@@ -1,5 +1,21 @@
|
||||
package varsig
|
||||
|
||||
// Ed25519 produces a varsig that describes the associated algorithm defined
|
||||
// by the [IANA JOSE specification].
|
||||
//
|
||||
// [IANA JOSE specidication]: https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms
|
||||
func Ed25519(payloadEncoding PayloadEncoding, opts ...Option) (*EdDSAVarsig, error) {
|
||||
return NewEdDSAVarsig(CurveEd25519, HashAlgorithmSHA512, payloadEncoding, opts...)
|
||||
}
|
||||
|
||||
// Ed448 produces a varsig that describes the associated algorithm defined
|
||||
// by the [IANA JOSE specification].
|
||||
//
|
||||
// [IANA JOSE specidication]: https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms
|
||||
func Ed448(payloadEncoding PayloadEncoding, opts ...Option) (*EdDSAVarsig, error) {
|
||||
return NewEdDSAVarsig(CurveEd448, HashAlgorithmShake256, payloadEncoding, opts...)
|
||||
}
|
||||
|
||||
// RS256 produces a varsig that describes the associated algorithm defined
|
||||
// by the [IANA JOSE specification].
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user