public class PlaintextKeys extends GPSessionKeyProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
PlaintextKeys.Diversification |
GPSessionKeyProvider.KeyPurpose| Modifier and Type | Field and Description |
|---|---|
static Map<GPSessionKeyProvider.KeyPurpose,byte[]> |
SCP02_CONSTANTS |
static Map<GPSessionKeyProvider.KeyPurpose,Byte> |
SCP03_CONSTANTS |
static Map<GPSessionKeyProvider.KeyPurpose,byte[]> |
SCP03_KDF_CONSTANTS |
| Modifier and Type | Method and Description |
|---|---|
void |
calculate(int scp,
byte[] kdd,
byte[] host_challenge,
byte[] card_challenge,
byte[] ssc) |
static PlaintextKeys |
derivedFromMasterKey(GPKey master,
PlaintextKeys.Diversification div) |
static GPKey |
diversify(GPKey k,
GPSessionKeyProvider.KeyPurpose usage,
byte[] kdd,
PlaintextKeys.Diversification method) |
static byte[] |
fillEmv(byte[] kdd,
GPSessionKeyProvider.KeyPurpose key) |
static byte[] |
fillVisa(byte[] kdd,
GPSessionKeyProvider.KeyPurpose key) |
static byte[] |
fillVisa2(byte[] kdd,
GPSessionKeyProvider.KeyPurpose key) |
static PlaintextKeys |
fromKeys(GPKey enc,
GPKey mac,
GPKey kek) |
static PlaintextKeys |
fromMasterKey(GPKey master) |
int |
getID() |
GPKey |
getKeyFor(GPSessionKeyProvider.KeyPurpose p) |
int |
getVersion() |
boolean |
init(byte[] atr,
byte[] cplc,
byte[] kinfo) |
void |
setDiversifier(PlaintextKeys.Diversification diversifier) |
void |
setVersion(int version) |
public static final Map<GPSessionKeyProvider.KeyPurpose,byte[]> SCP02_CONSTANTS
public static final Map<GPSessionKeyProvider.KeyPurpose,Byte> SCP03_CONSTANTS
public static final Map<GPSessionKeyProvider.KeyPurpose,byte[]> SCP03_KDF_CONSTANTS
public static PlaintextKeys fromMasterKey(GPKey master)
public static PlaintextKeys derivedFromMasterKey(GPKey master, PlaintextKeys.Diversification div)
public static PlaintextKeys fromKeys(GPKey enc, GPKey mac, GPKey kek)
public static GPKey diversify(GPKey k, GPSessionKeyProvider.KeyPurpose usage, byte[] kdd, PlaintextKeys.Diversification method) throws GPException
GPExceptionpublic static final byte[] fillVisa2(byte[] kdd,
GPSessionKeyProvider.KeyPurpose key)
public static final byte[] fillVisa(byte[] kdd,
GPSessionKeyProvider.KeyPurpose key)
public static final byte[] fillEmv(byte[] kdd,
GPSessionKeyProvider.KeyPurpose key)
public int getVersion()
getVersion in class GPSessionKeyProviderpublic void setVersion(int version)
public boolean init(byte[] atr,
byte[] cplc,
byte[] kinfo)
init in class GPSessionKeyProviderpublic void calculate(int scp,
byte[] kdd,
byte[] host_challenge,
byte[] card_challenge,
byte[] ssc)
throws GPException
calculate in class GPSessionKeyProviderGPExceptionpublic GPKey getKeyFor(GPSessionKeyProvider.KeyPurpose p)
getKeyFor in class GPSessionKeyProviderpublic int getID()
getID in class GPSessionKeyProviderpublic void setDiversifier(PlaintextKeys.Diversification diversifier)
Copyright © 2018. All rights reserved.