|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.cert.ct.SignedCertificateTimestamp
A single Signed Certificate Timestamp (SCT) in the RFC 6962 (CT v1) wire
format. Decoded from the TLS-encoded payload of a
SignedCertificateTimestampList.
enum { v1(0), (255) } Version;
struct {
opaque key_id[32];
} LogID;
opaque CtExtensions<0..2^16-1>;
struct {
Version sct_version;
LogID id;
uint64 timestamp;
CtExtensions extensions;
digitally-signed struct {
Version sct_version;
SignatureType signature_type = certificate_timestamp;
uint64 timestamp;
LogEntryType entry_type;
select(entry_type) {
case x509_entry: ASN.1Cert;
case precert_entry: PreCert;
} signed_entry;
CtExtensions extensions;
};
} SignedCertificateTimestamp;
The value is the TLS 1.2 sec. 4.7 form: a one-byte
HashAlgorithm and a one-byte SignatureAlgorithm followed by a
two-byte-length-prefixed opaque signature. This class exposes the
algorithm pair and the raw signature bytes; computing the signed leaf
structure and verifying it against a log's public key is a higher-level
concern handled outside this decode-only API.
For RFC 9162 (CT v2), see SignedCertificateTimestampDataV2.
| Field Summary | |
static int |
LOG_ID_LENGTH
|
static int |
VERSION_V1
|
| Constructor Summary | |
SignedCertificateTimestamp(int sctVersion,
byte[] logID,
long timestamp,
byte[] extensions,
int hashAlgorithm,
int signatureAlgorithm,
byte[] signature)
|
|
| Method Summary | |
byte[] |
getEncoded()
Serialize this SCT to its TLS wire form (the bytes that would be carried as one entry in a list). |
byte[] |
getExtensions()
The opaque blob carried in the SCT. |
int |
getHashAlgorithm()
TLS HashAlgorithm byte (sha256 = 4, etc.). |
static SignedCertificateTimestamp |
getInstance(byte[] encoded)
Decode an SCT from its serialized TLS form (the bytes that appear as one entry inside a SignedCertificateTimestampList). |
byte[] |
getLogID()
32-byte log identifier (SHA-256 of the log's DER-encoded public key). |
int |
getSctVersion()
SCT version byte. |
byte[] |
getSignature()
Raw signature bytes (the opaque signature field from the digitally-signed struct). |
int |
getSignatureAlgorithm()
TLS SignatureAlgorithm byte (rsa = 1, dsa = 2, ecdsa = 3). |
long |
getTimestamp()
Issuance timestamp in milliseconds since the Unix epoch (Java convention; the same value the wire form uses). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int LOG_ID_LENGTH
public static final int VERSION_V1
| Constructor Detail |
public SignedCertificateTimestamp(int sctVersion,
byte[] logID,
long timestamp,
byte[] extensions,
int hashAlgorithm,
int signatureAlgorithm,
byte[] signature)
| Method Detail |
public static SignedCertificateTimestamp getInstance(byte[] encoded)
SignedCertificateTimestampList).
public int getSctVersion()
public byte[] getLogID()
public long getTimestamp()
public byte[] getExtensions()
public int getHashAlgorithm()
public int getSignatureAlgorithm()
public byte[] getSignature()
public byte[] getEncoded()
|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||