View Source jose_curve448 behaviour (JOSE v1.11.10)

Summary

Types

-type context() :: binary().
-type eddsa_public_key() :: <<_:456>>.
-type eddsa_secret_key() :: <<_:912>>.
-type eddsa_seed() :: <<_:456>>.
Link to this type

maybe_invalid_signature/0

View Source
-type maybe_invalid_signature() :: signature() | binary().
-type message() :: binary().
-type signature() :: <<_:912>>.
-type x448_public_key() :: <<_:448>>.
-type x448_secret_key() :: <<_:448>>.
-type x448_seed() :: <<_:448>>.
-type x448_shared_secret() :: <<_:448>>.

Callbacks

-callback ed448_sign(Message :: message(), SecretKey :: eddsa_secret_key()) -> Signature :: signature().
-callback ed448_sign(Message :: message(), SecretKey :: eddsa_secret_key(), Context :: context()) ->
              Signature :: signature().
-callback ed448_verify(Signature :: maybe_invalid_signature(),
             Message :: message(),
             PublicKey :: eddsa_public_key()) ->
                boolean().
-callback ed448_verify(Signature :: maybe_invalid_signature(),
             Message :: message(),
             PublicKey :: eddsa_public_key(),
             Context :: context()) ->
                boolean().
-callback ed448ph_sign(Message :: message(), SecretKey :: eddsa_secret_key()) -> Signature :: signature().
-callback ed448ph_sign(Message :: message(), SecretKey :: eddsa_secret_key(), Context :: context()) ->
                Signature :: signature().
-callback ed448ph_verify(Signature :: maybe_invalid_signature(),
               Message :: message(),
               PublicKey :: eddsa_public_key()) ->
                  boolean().
-callback ed448ph_verify(Signature :: maybe_invalid_signature(),
               Message :: message(),
               PublicKey :: eddsa_public_key(),
               Context :: context()) ->
                  boolean().
-callback eddsa_keypair() -> {PublicKey :: eddsa_public_key(), SecretKey :: eddsa_secret_key()}.
-callback eddsa_keypair(Seed :: eddsa_seed()) ->
                 {PublicKey :: eddsa_public_key(), SecretKey :: eddsa_secret_key()}.
Link to this callback

eddsa_secret_to_public/1

View Source
-callback eddsa_secret_to_public(SecretKey :: eddsa_secret_key()) -> PublicKey :: eddsa_public_key().
-callback x448_keypair() -> {PublicKey :: eddsa_public_key(), SecretKey :: eddsa_secret_key()}.
-callback x448_keypair(Seed :: x448_seed()) ->
                {PublicKey :: x448_public_key(), SecretKey :: x448_secret_key()}.
-callback x448_secret_to_public(SecretKey :: x448_secret_key()) -> PublicKey :: x448_public_key().
-callback x448_shared_secret(MySecretKey :: x448_secret_key(), YourPublicKey :: x448_public_key()) ->
                      SharedSecret :: x448_shared_secret().

Functions

Link to this function

ed448_sign(Message, SecretKey)

View Source
-spec ed448_sign(message(), eddsa_secret_key()) -> signature().
Link to this function

ed448_sign(Message, SecretKey, Context)

View Source
-spec ed448_sign(message(), eddsa_secret_key(), context()) -> signature().
Link to this function

ed448_verify(Signature, Message, PublicKey)

View Source
-spec ed448_verify(maybe_invalid_signature(), message(), eddsa_public_key()) -> boolean().
Link to this function

ed448_verify(Signature, Message, PublicKey, Context)

View Source
-spec ed448_verify(maybe_invalid_signature(), message(), eddsa_public_key(), context()) -> boolean().
Link to this function

ed448ph_sign(Message, SecretKey)

View Source
-spec ed448ph_sign(message(), eddsa_secret_key()) -> signature().
Link to this function

ed448ph_sign(Message, SecretKey, Context)

View Source
-spec ed448ph_sign(message(), eddsa_secret_key(), context()) -> signature().
Link to this function

ed448ph_verify(Signature, Message, PublicKey)

View Source
-spec ed448ph_verify(maybe_invalid_signature(), message(), eddsa_public_key()) -> boolean().
Link to this function

ed448ph_verify(Signature, Message, PublicKey, Context)

View Source
-spec ed448ph_verify(maybe_invalid_signature(), message(), eddsa_public_key(), context()) -> boolean().
-spec eddsa_keypair() -> {eddsa_public_key(), eddsa_secret_key()}.
-spec eddsa_keypair(eddsa_seed()) -> {eddsa_public_key(), eddsa_secret_key()}.
Link to this function

eddsa_secret_to_public(SecretKey)

View Source
-spec eddsa_secret_to_public(eddsa_secret_key()) -> eddsa_public_key().
-spec x448_keypair() -> {x448_public_key(), x448_secret_key()}.
-spec x448_keypair(x448_seed()) -> {x448_public_key(), x448_secret_key()}.
Link to this function

x448_secret_to_public(SecretKey)

View Source
-spec x448_secret_to_public(x448_secret_key()) -> x448_public_key().
Link to this function

x448_shared_secret(MySecretKey, YourPublicKey)

View Source
-spec x448_shared_secret(MySecretKey :: x448_secret_key(), YourPublicKey :: x448_public_key()) ->
                      x448_shared_secret().