Changeset 6

Show
Ignore:
Timestamp:
06/26/06 23:27:53 (4 years ago)
Author:
martin
Message:

javadoc comments for TCPAIdentityProof

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tpm4java/trunk/src/de/datenzone/tpm4java/TCPAIdentityProof.java

    r1 r6  
    3030import java.security.spec.InvalidKeySpecException; 
    3131 
     32/** 
     33 * TCPAIdentityProof is the structure that is sent to a privacy CA (encrypted in 
     34 * an Identity Request) 
     35 *  
     36 * @author Martin Hermanowski 
     37 *  
     38 */ 
    3239public class TCPAIdentityProof implements Serializable { 
    3340    private static final long serialVersionUID = -8802683964528865550L; 
     
    4754    private byte[] identityBinding; 
    4855 
     56    /** 
     57     * @return the identityBinding signature 
     58     */ 
    4959    public byte[] getIdentityBinding() { 
    5060        return identityBinding; 
    5161    } 
    5262 
     63    /** 
     64     * set the identityBinding signature 
     65     *  
     66     * @param identityBinding 
     67     */ 
    5368    public void setIdentityBinding(byte[] identityBinding) { 
    5469        this.identityBinding = identityBinding; 
     
    5671 
    5772    /** 
     73     * create a TCPAIdentityProof with the given parameters 
     74     *  
    5875     * @param version 
    5976     * @param identityKey 
     77     *            the key for which this should be the proof 
    6078     * @param labelArea 
     79     *            the CA's label 
    6180     * @param endorsementCredential 
     81     *            should be a certificate... may not be <b>null</b>, but 
     82     *            byte[0] for SimplePrivacyCA 
    6283     * @param platformCredential 
     84     *            same as above 
    6385     * @param conformanceCredential 
     86     *            same as above 
     87     * @param identityBinding 
     88     *            the identityBinding signature 
    6489     */ 
    6590    public TCPAIdentityProof(int version, TPMPubKeyWrapper identityKey, 
     
    77102    } 
    78103 
     104    /** 
     105     * verify the identityBinding structure. This might be needed to check for 
     106     * the wrong version in the TPM-Quote command. 
     107     *  
     108     * @param chosenId 
     109     * @return 
     110     * @throws SignatureException 
     111     * @throws InvalidKeyException 
     112     * @throws InvalidKeySpecException 
     113     * @throws NoSuchAlgorithmException 
     114     */ 
    79115    boolean verify(byte[] chosenId) throws SignatureException, 
    80116            InvalidKeyException, InvalidKeySpecException, 
     
    145181    } 
    146182 
     183    /** 
     184     * assemble a raw IdentityProof structure 
     185     *  
     186     * @return the raw blob 
     187     */ 
    147188    public byte[] getRaw() { 
    148189        byte[] pubKey = getIdentityKey().getRaw(); 
     
    168209    } 
    169210 
     211    /** 
     212     * parse a raw IdentityProof structure 
     213     *  
     214     * @param raw 
     215     */ 
    170216    public TCPAIdentityProof(byte[] raw) { 
    171217        ByteBuffer b = ByteBuffer.wrap(raw);