Class MTCContentSigner

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
      Return the algorithm identifier describing the signature algorithm and parameters this signer generates.
      java.io.OutputStream getOutputStream()
      Returns a stream that will accept data for the purpose of calculating a signature.
      byte[] getSignature()
      Returns a signature based on the current data written to the stream, since the start or the last call to getSignature().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MTCContentSigner

        public MTCContentSigner​(MTCLog log,
                                byte[] inclusionProof,
                                MTCCosigner cosigner)
        The cosigner's identity is taken from MTCCosigner.getCosignerId() — the CA-as-cosigner case is just a MTCCosigner constructed with log.getCa().getCaId() as its cosigner ID (Section 5.3 of the draft). Witnesses, regulators, federated peers or any other entity with a distinct trust anchor ID work via the same constructor by constructing the cosigner with their own ID.
        Parameters:
        log - issuance log + subtree window [log.getStart(), log.getEnd()) — also supplies the CA (via MTCLog.getCa()) and therefore the hash function and log ID
        inclusionProof - the single sibling leaf hash that, combined with the EE's leaf hash, yields the subtree hash — same bytes that land in the resulting MTCProof
        cosigner - cosigner driver bound to its trust anchor ID, signature algorithm and key
    • Method Detail

      • getAlgorithmIdentifier

        public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
        Description copied from interface: ContentSigner
        Return the algorithm identifier describing the signature algorithm and parameters this signer generates.
        Specified by:
        getAlgorithmIdentifier in interface ContentSigner
        Returns:
        algorithm oid and parameters.
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Description copied from interface: ContentSigner
        Returns a stream that will accept data for the purpose of calculating a signature. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.
        Specified by:
        getOutputStream in interface ContentSigner
        Returns:
        an OutputStream
      • getSignature

        public byte[] getSignature()
        Description copied from interface: ContentSigner
        Returns a signature based on the current data written to the stream, since the start or the last call to getSignature().
        Specified by:
        getSignature in interface ContentSigner
        Returns:
        bytes representing the signature.