Class TransparencyLogEntry
TransparencyLogEntry captures all the details required from Rekor to reconstruct an entry, given that the payload is provided via other means. This type can easily be created from the existing response from Rekor. Future iterations could rely on Rekor returning the minimal set of attributes (excluding the payload) that are required for verifying the inclusion promise. The inclusion promise (called SignedEntryTimestamp in the response from Rekor) is similar to a Signed Certificate Timestamp as described here https://www.rfc-editor.org/rfc/rfc6962.html#section-3.2.
public sealed class TransparencyLogEntry : IMessage<TransparencyLogEntry>, IEquatable<TransparencyLogEntry>, IDeepCloneable<TransparencyLogEntry>, IBufferMessage, IMessage
- Inheritance
-
TransparencyLogEntry
- Implements
-
IMessage<TransparencyLogEntry>IDeepCloneable<TransparencyLogEntry>IBufferMessageIMessage
- Inherited Members
Constructors
TransparencyLogEntry()
public TransparencyLogEntry()
TransparencyLogEntry(TransparencyLogEntry)
public TransparencyLogEntry(TransparencyLogEntry other)
Parameters
otherTransparencyLogEntry
Fields
CanonicalizedBodyFieldNumber
Field number for the "canonicalized_body" field.
public const int CanonicalizedBodyFieldNumber = 7
Field Value
InclusionPromiseFieldNumber
Field number for the "inclusion_promise" field.
public const int InclusionPromiseFieldNumber = 5
Field Value
InclusionProofFieldNumber
Field number for the "inclusion_proof" field.
public const int InclusionProofFieldNumber = 6
Field Value
IntegratedTimeFieldNumber
Field number for the "integrated_time" field.
public const int IntegratedTimeFieldNumber = 4
Field Value
KindVersionFieldNumber
Field number for the "kind_version" field.
public const int KindVersionFieldNumber = 3
Field Value
LogIdFieldNumber
Field number for the "log_id" field.
public const int LogIdFieldNumber = 2
Field Value
LogIndexFieldNumber
Field number for the "log_index" field.
public const int LogIndexFieldNumber = 1
Field Value
Properties
CanonicalizedBody
Optional. The canonicalized transparency log entry, used to
reconstruct the Signed Entry Timestamp (SET) during verification.
The contents of this field are the same as the body field in
a Rekor response, meaning that it does not include the "full"
canonicalized form (of log index, ID, etc.) which are
exposed as separate fields. The verifier is responsible for
combining the canonicalized_body, log_index, log_id,
and integrated_time into the payload that the SET's signature
is generated over.
This field is intended to be used in cases where the SET cannot be
produced determinisitically (e.g. inconsistent JSON field ordering,
differing whitespace, etc).
If set, clients MUST verify that the signature referenced in the
canonicalized_body matches the signature provided in the
Bundle.content.
If not set, clients are responsible for constructing an equivalent
payload from other sources to verify the signature.
public ByteString CanonicalizedBody { get; set; }
Property Value
- ByteString
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
InclusionPromise
The inclusion promise/signed entry timestamp from the log. Required for v0.1 bundles, and MUST be verified. Optional for >= v0.2 bundles if another suitable source of time is present (such as another source of signed time, or the current system time for long-lived certificates). MUST be verified if no other suitable source of time is present, and SHOULD be verified otherwise.
public InclusionPromise InclusionPromise { get; set; }
Property Value
InclusionProof
The inclusion proof can be used for offline or online verification that the entry was appended to the log, and that the log has not been altered.
public InclusionProof InclusionProof { get; set; }
Property Value
IntegratedTime
The UNIX timestamp from the log when the entry was persisted. The integration time MUST NOT be trusted if inclusion_promise is omitted.
public long IntegratedTime { get; set; }
Property Value
KindVersion
The kind (type) and version of the object associated with this entry. These values are required to construct the entry during verification.
public KindVersion KindVersion { get; set; }
Property Value
LogId
The unique identifier of the log.
public LogId LogId { get; set; }
Property Value
LogIndex
The global index of the entry, used when querying the log by index.
public long LogIndex { get; set; }
Property Value
Parser
public static MessageParser<TransparencyLogEntry> Parser { get; }
Property Value
- MessageParser<TransparencyLogEntry>
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public TransparencyLogEntry Clone()
Returns
- TransparencyLogEntry
A deep clone of this object.
Equals(TransparencyLogEntry)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(TransparencyLogEntry other)
Parameters
otherTransparencyLogEntryAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(TransparencyLogEntry)
Merges the given message into this one.
public void MergeFrom(TransparencyLogEntry other)
Parameters
otherTransparencyLogEntry
Remarks
See the user guide for precise merge semantics.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.