3.6.3 Ed25519
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SSL Interface
        • library(crypto): Cryptography and authentication library
          • Digital signatures
            • Ed25519
              • ed25519_new_keypair/1
              • ed25519_seed_keypair/2
              • ed25519_keypair_public_key/2
              • ed25519_sign/4
              • ed25519_verify/4
Availability::- use_module(library(crypto)).(can be autoloaded)
Source[det]ed25519_sign(+KeyPair, +Data, -Signature, +Options)
Create an Ed25519 (RFC 8032) signature for Data with the private key of KeyPair, as created by ed25519_new_keypair/1 or obtained with load_private_key/3. Signature is a hexadecimal atom.

Options:

encoding(+Encoding)
Encoding to use for Data. Default is utf8. Alternatives are octet, text and hex. Note that this differs from ecdsa_sign/4 and rsa_sign/4, which default to hex because they are typically applied to a hash of the data. Ed25519 signs the data itself.