|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiaik.tc.tss.impl.csp.TcBasicCrypto
iaik.tc.tss.impl.csp.TcCrypto
public class TcCrypto
This class is the CSP (crypto service provider) of the TSS. That means that all cryptographic functionality required by the TSS is centralized in this class. The intention is to make porting to different crypto libraries as simple as possible. * To allow compilation of the API definition (without implementation) (i.e. for Wrapper translation with GCJ), the TcCrypto class has been split in a basic part, and a full implementation that extends it. TcCrypto is not compatible with GCJ (without additional crypto libs).
Constructor Summary | |
---|---|
TcCrypto()
|
Method Summary | |
---|---|
static TcBlobData |
create3DESkey()
This method calls the JCE to create a new 3DES key. |
static TcBlobData |
createAESkey(int keysize)
This method calls the JCE to create a new AES key. |
static TcTpmNonce |
createTcgNonce()
This method returns TPM_SHA1BASED_NONCE_LEN bytes of random data. |
static TcBlobData |
decryptRsaEcbPkcs1Padding(TcTpmPubkey pubKey,
TcBlobData inputData)
|
static TcBlobData |
decryptSymmetricCbcPkcs5Pad(java.lang.String algo,
TcBlobData symKey,
TcBlobData iv,
TcBlobData encData)
This method decrypts the given data blob using the given symKey and the IV. |
static TcBlobData |
encryptSymmetricCbcPkcs5Pad(java.lang.String algo,
TcBlobData symKey,
TcBlobData iv,
TcBlobData plainData)
This method encrypts the given data blob using the given symKey and the IV. |
static TcBlobData |
getRandom(int numBytes)
This method returns numBytes bytes of random data. |
static byte[] |
privJavaPrimePToByte(java.security.interfaces.RSAPrivateCrtKey privateKey)
This method takes a Java RSA private key object and extracts the prime factor P as a byte array. |
static TcBlobData |
pubEncryptRsaEcbPkcs1Padding(TcTpmPubkey pubKey,
TcBlobData plainData)
|
static TcBlobData |
pubEncryptRsaOaepSha1Mgf1(TcTpmPubkey pubKey,
TcBlobData plainData)
|
static TcTpmPubkey |
pubJavaToTpmKey(java.security.interfaces.RSAPublicKey publickey)
This method takes a Java RSA public key object and converts it into a TPM public key structure. |
static java.security.interfaces.RSAPublicKey |
pubTpmKeyToJava(TcTpmPubkey pubKey)
This method takes a TPM public key structure and converts it into a Java RSA public key object. |
Methods inherited from class iaik.tc.tss.impl.csp.TcBasicCrypto |
---|
checkCryptoAvailability, hmacSha1, sha1, xor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TcCrypto()
Method Detail |
---|
public static TcBlobData pubEncryptRsaOaepSha1Mgf1(TcTpmPubkey pubKey, TcBlobData plainData) throws TcTcsException
TcTcsException
public static TcBlobData pubEncryptRsaEcbPkcs1Padding(TcTpmPubkey pubKey, TcBlobData plainData) throws TcTcsException
TcTcsException
public static TcBlobData decryptRsaEcbPkcs1Padding(TcTpmPubkey pubKey, TcBlobData inputData) throws TcTcsException
TcTcsException
public static TcBlobData encryptSymmetricCbcPkcs5Pad(java.lang.String algo, TcBlobData symKey, TcBlobData iv, TcBlobData plainData) throws TcTcsException
TcTcsException
public static TcBlobData decryptSymmetricCbcPkcs5Pad(java.lang.String algo, TcBlobData symKey, TcBlobData iv, TcBlobData encData) throws TcTcsException
TcTcsException
public static TcBlobData create3DESkey()
public static TcBlobData createAESkey(int keysize) throws TcTssException
keysize
- Key size in bits.
TcTssException
public static TcBlobData getRandom(int numBytes)
public static TcTpmNonce createTcgNonce()
public static TcTpmPubkey pubJavaToTpmKey(java.security.interfaces.RSAPublicKey publickey)
public static java.security.interfaces.RSAPublicKey pubTpmKeyToJava(TcTpmPubkey pubKey)
public static byte[] privJavaPrimePToByte(java.security.interfaces.RSAPrivateCrtKey privateKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |