Class Challenge

java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.cmp.Challenge
All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable, org.bouncycastle.util.Encodable

public class Challenge extends org.bouncycastle.asn1.ASN1Object
 Challenge ::= SEQUENCE {
          owf                 AlgorithmIdentifier  OPTIONAL,

          -- MUST be present in the first Challenge; MAY be omitted in
          -- any subsequent Challenge in POPODecKeyChallContent (if
          -- omitted, then the owf used in the immediately preceding
          -- Challenge is to be used).

          witness             OCTET STRING,
          -- the result of applying the one-way function (owf) to a
          -- randomly-generated INTEGER, A.  [Note that a different
          -- INTEGER MUST be used for each Challenge.]
          challenge           OCTET STRING
          -- the encryption (under the public key for which the cert.
          -- request is being made) of Rand, where Rand is specified as
          --   Rand ::= SEQUENCE {
          --      int      INTEGER,
          --       - the randomly-generated INTEGER A (above)
          --      sender   GeneralName
          --       - the sender's name (as included in PKIHeader)
          --   }
      }
      
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Rand is the inner type
  • Constructor Summary

    Constructors
    Constructor
    Description
    Challenge(byte[] witness, byte[] challenge)
     
    Challenge(org.bouncycastle.asn1.x509.AlgorithmIdentifier owf, byte[] witness, byte[] challenge)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
     
    static Challenge
     
    org.bouncycastle.asn1.x509.AlgorithmIdentifier
     
    byte[]
     
    org.bouncycastle.asn1.ASN1Primitive
    Challenge ::= SEQUENCE { owf AlgorithmIdentifier OPTIONAL, -- MUST be present in the first Challenge; MAY be omitted in -- any subsequent Challenge in POPODecKeyChallContent (if -- omitted, then the owf used in the immediately preceding -- Challenge is to be used).

    Methods inherited from class org.bouncycastle.asn1.ASN1Object

    encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Challenge

      public Challenge(byte[] witness, byte[] challenge)
    • Challenge

      public Challenge(org.bouncycastle.asn1.x509.AlgorithmIdentifier owf, byte[] witness, byte[] challenge)
  • Method Details

    • getInstance

      public static Challenge getInstance(Object o)
    • getOwf

      public org.bouncycastle.asn1.x509.AlgorithmIdentifier getOwf()
    • getWitness

      public byte[] getWitness()
    • getChallenge

      public byte[] getChallenge()
    • toASN1Primitive

      public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
       Challenge ::= SEQUENCE {
                       owf                 AlgorithmIdentifier  OPTIONAL,
      
                       -- MUST be present in the first Challenge; MAY be omitted in
                       -- any subsequent Challenge in POPODecKeyChallContent (if
                       -- omitted, then the owf used in the immediately preceding
                       -- Challenge is to be used).
      
                       witness             OCTET STRING,
                       -- the result of applying the one-way function (owf) to a
                       -- randomly-generated INTEGER, A.  [Note that a different
                       -- INTEGER MUST be used for each Challenge.]
                       challenge           OCTET STRING
                       -- the encryption (under the public key for which the cert.
                       -- request is being made) of Rand, where Rand is specified as
                       --   Rand ::= SEQUENCE {
                       --      int      INTEGER,
                       --       - the randomly-generated INTEGER A (above)
                       --      sender   GeneralName
                       --       - the sender's name (as included in PKIHeader)
                       --   }
            }
       
      Specified by:
      toASN1Primitive in interface org.bouncycastle.asn1.ASN1Encodable
      Specified by:
      toASN1Primitive in class org.bouncycastle.asn1.ASN1Object
      Returns:
      a basic ASN.1 object representation.