The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Crypt::Perl::X509::SCT

DESCRIPTION

This implements encoding of the structure defined in https://tools.ietf.org/html/rfc6962#section-3.2.

IMPORTANT: Because SCT records timestamps in milliseconds rather than seconds, this module requires a 64-bit Perl interpreter.

SEE ALSO

https://letsencrypt.org/2018/04/04/sct-encoding.html has an excellent walkthrough of the format that this module deals with.

FUNCTIONS

encode( %opts )

For now this always encodes a version 1 structure.

%opts is:

  • key_id - 32-byte string

  • timestamp - integer (NB: milliseconds)

  • hash_algorithm - See https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 for allowed values (e.g., sha256).

  • signature_algorithm - Currently accepted values are rsa and ecdsa. (cf. the URL for hash_algorithm values)

  • signature - The signature (binary string).