public final class MTCCosignedMessage
extends java.lang.Object
struct {
uint8 label[12] = "subtree/v1\n\0";
opaque cosigner_name<1..2^8-1>;
uint64 timestamp;
opaque log_origin<1..2^8-1>;
uint64 start;
uint64 end;
HashValue subtree_hash;
} CosignedMessage;
cosigner_name and log_origin are the ASCII strings
"oid/1.3.6.1.4.1." + <dotted-decimal trust anchor ID>, constructed
from the binary trust anchor IDs supplied by the caller.
MTCSignatureVerifier,
MTCCosignerVerifier| Modifier and Type | Method and Description |
|---|---|
static byte[] |
encode(byte[] logId,
long start,
long end,
byte[] subtreeHash,
byte[] cosignerId)
Equivalent to
encode(byte[], long, long, long, byte[], byte[]) with
timestamp == 0, which is the only value permitted inside an MTCProof
cosigner signature per Section 6.1 of the draft. |
static byte[] |
encode(byte[] logId,
long timestamp,
long start,
long end,
byte[] subtreeHash,
byte[] cosignerId)
Encodes a CosignedMessage in the wire format defined by Section 5.3.1.
|
static byte[] |
encode(MTCLog log,
byte[] subtreeHash,
byte[] cosignerId)
Equivalent to
encode(byte[], long, long, byte[], byte[]) taking
the log ID and subtree window from an MTCLog. |
static byte[] |
encode(MTCLog log,
long timestamp,
byte[] subtreeHash,
byte[] cosignerId)
Equivalent to
encode(byte[], long, long, long, byte[], byte[])
taking the log ID and subtree window from an MTCLog. |
public static byte[] encode(byte[] logId,
long start,
long end,
byte[] subtreeHash,
byte[] cosignerId)
throws java.io.IOException
encode(byte[], long, long, long, byte[], byte[]) with
timestamp == 0, which is the only value permitted inside an MTCProof
cosigner signature per Section 6.1 of the draft.java.io.IOExceptionpublic static byte[] encode(MTCLog log, byte[] subtreeHash, byte[] cosignerId) throws java.io.IOException
encode(byte[], long, long, byte[], byte[]) taking
the log ID and subtree window from an MTCLog. Convenient for
issuer-side code that already carries an MTCLog object.java.io.IOExceptionpublic static byte[] encode(MTCLog log, long timestamp, byte[] subtreeHash, byte[] cosignerId) throws java.io.IOException
encode(byte[], long, long, long, byte[], byte[])
taking the log ID and subtree window from an MTCLog. Use the
non-MTCProof case where a non-zero timestamp is required.java.io.IOExceptionpublic static byte[] encode(byte[] logId,
long timestamp,
long start,
long end,
byte[] subtreeHash,
byte[] cosignerId)
throws java.io.IOException
logId - binary trust anchor ID of the logtimestamp - POSIX timestamp (zero inside an MTCProof; non-zero elsewhere)start - subtree start indexend - subtree end indexsubtreeHash - hash of the subtreecosignerId - binary trust anchor ID of the cosignerjava.io.IOException