|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectde.datenzone.tpm4java.TPMKeyWrapper
public class TPMKeyWrapper
A wrapper for a key which was generated by the tpm. Besides the readable public part of the key, the encrypted private key is also included.
| Field Summary | |
|---|---|
static short |
KEYFLAG_MIGRATABLE
|
static short |
TPM_KEY_AUTHCHANGE
|
static short |
TPM_KEY_BIND
|
static short |
TPM_KEY_IDENTITY
|
static short |
TPM_KEY_LEGACY
|
static short |
TPM_KEY_SIGNING
|
static short |
TPM_KEY_STORAGE
|
| Constructor Summary | |
|---|---|
TPMKeyWrapper()
Create an empty key wrapper |
|
TPMKeyWrapper(byte[] raw)
parse a TPM structure and create a new key wrapper |
|
TPMKeyWrapper(java.nio.ByteBuffer raw)
parse a TPM structure and create a new key wrapper |
|
| Method Summary | |
|---|---|
byte[] |
buildBuffer(boolean pcr_present)
Create a native TPM key structure |
byte[] |
buildBuffer12(boolean pcr_present)
like buildBuffer, but create a TPM_KEY12 structure instead. |
byte[] |
getEncprivkey()
|
int |
getKeyflags()
|
short |
getKeyusage()
|
TPMPubKeyWrapper |
getPub()
|
byte[] |
getRaw()
|
int |
getVersion()
|
boolean |
isAuthdatausage()
|
void |
setAuthdatausage(boolean authdatausage)
|
void |
setEncprivkey(byte[] encprivkey)
|
void |
setKeyflag(short flag)
Set a key flag |
void |
setKeyflags(int keyflags)
|
void |
setKeyusage(short keyusage)
|
void |
setPub(TPMPubKeyWrapper pub)
|
void |
setVersion(int version)
|
static TPMKeyWrapper |
templateAIK()
Create a template for a attestation identity key |
static TPMKeyWrapper |
templateBind()
Create a template for a binding (aka encryption) key |
static TPMKeyWrapper |
templateLegacy()
Create a template for a legacy (ie. encryption and signing) key |
static TPMKeyWrapper |
templateSigning()
Create a template for a signing key |
static TPMKeyWrapper |
templateStorage()
Create a template for a storage key |
java.lang.String |
toString()
|
void |
unsetKeyflag(short flag)
unset a key flag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final short KEYFLAG_MIGRATABLE
public static final short TPM_KEY_SIGNING
public static final short TPM_KEY_STORAGE
public static final short TPM_KEY_IDENTITY
public static final short TPM_KEY_AUTHCHANGE
public static final short TPM_KEY_BIND
public static final short TPM_KEY_LEGACY
| Constructor Detail |
|---|
public TPMKeyWrapper()
public TPMKeyWrapper(byte[] raw)
raw - public TPMKeyWrapper(java.nio.ByteBuffer raw)
raw - | Method Detail |
|---|
public void setKeyflag(short flag)
flag - public void unsetKeyflag(short flag)
flag - public void setAuthdatausage(boolean authdatausage)
public byte[] buildBuffer(boolean pcr_present)
pcr_present - whether a PCRInfo field should be present
public byte[] buildBuffer12(boolean pcr_present)
pcr_present -
public byte[] getEncprivkey()
public void setEncprivkey(byte[] encprivkey)
public int getKeyflags()
public void setKeyflags(int keyflags)
public short getKeyusage()
public void setKeyusage(short keyusage)
public int getVersion()
public void setVersion(int version)
public boolean isAuthdatausage()
public TPMPubKeyWrapper getPub()
public void setPub(TPMPubKeyWrapper pub)
public java.lang.String toString()
toString in class java.lang.Objectpublic static TPMKeyWrapper templateStorage()
public static TPMKeyWrapper templateSigning()
public static TPMKeyWrapper templateBind()
public static TPMKeyWrapper templateLegacy()
public static TPMKeyWrapper templateAIK()
public byte[] getRaw()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||