Class GBAUSignature

java.lang.Object
uicc.usim.gba_u.GBAUSignature
Direct Known Subclasses:
GBAUSignature.OneShot

public abstract class GBAUSignature extends Object
The GBAUSignature class is the base class for Signature algorithms. Implementations of Signature algorithms must extend this class and implement all the abstract methods.

The term "pad" is used in the public key signature algorithms below to refer to all the operations specified in the referenced scheme to transform the message digest into the encryption block size.

Ks_int_NAF keys, internal keys generated during GBA_U process (see 3GPP TS 31.102 and 3GPP TS 33.220), are the only ones used in this class. Those keys are 256 bits symmetric keys then all asymmetric key algorithms are not supported.

Ks_int_NAF keys are 256 bits symmetric keys then all asymmetric key algorithms are not supported.

A tear or card reset event resets an initialized Signature object to the state it was in when previously initialized via a call to init() methods. For algorithms which support keys with transient key data sets, such as AES, Korean SEED and SM3 the GBAUSignature object key becomes uninitialized on clear events associated with the key associated to the appropriate NAF ID (Ks_int_NAF Key) used to initialize the GBAUSignature object.

Even if a transaction is in progress, update of intermediate result state in the implementation instance shall not participate in the transaction.

Note:
  • On a tear or card reset event, the AES, Korean SEED and SM3 algorithms in CBC mode reset the initial vector(IV) to 0. The initial vector(IV) can be re-initialized using the init() methods.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    The OneShot class is a specialization of the GBAUSignature class intended to support efficient one-shot ciphering and deciphering operations that may avoid persistent memory writes entirely.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
    HMAC message authentication algorithm ALG_HMAC_SM3 This algorithm generates an HMAC following the steps found in RFC: 2104 using SM3 as the hashing algorithm.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    protected constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract byte
    Gets the Signature algorithm.
    abstract byte
    Gets the cipher algorithm.
    getInstance(byte algorithm, boolean externalAccess)
    Create an instance of the GBAUSignature class.
    getInstance(byte messageDigestAlgorithm, byte cipherAlgorithm, byte paddingAlgorithm, boolean externalAccess)
    Create an instance of the GBAUSignature with the selected message digest algorithm, cipher algorithm and padding algorithm.
    abstract short
    Returns the short length of the signature data.
    abstract byte
    Gets the message digest algorithm.
    abstract byte
    Gets the padding algorithm.
    abstract void
    init(byte theMode, byte[] adfAID, short adfAIDOff, short adfAIDLen, byte[] nafID, short nafIDOff, short nafIDLen)
    Initializes the GBAUSignature object with the appropriate NAF ID (then Ks_int_NAF Key).
    abstract void
    init(byte theMode, byte[] adfAID, short adfAIDOff, short adfAIDLen, byte[] nafID, short nafIDOff, short nafIDLen, byte[] bArray, short bOff, short bLen)
    Initializes the GBAUSignature object with the appropriate NAF ID (then Ks_int_NAF Key) and algorithm specific parameters.
    abstract void
    init(byte theMode, byte[] adfAID, short adfAIDOff, short adfAIDLen, byte[] nafID, short nafIDOff, short nafIDLen, byte[] bArray, short bOff, short bLen, short keyLength)
    Initializes the GBAUSignature object with the appropriate NAF ID (then Ks_int_NAF Key) and algorithm specific parameters.
    abstract void
    init(byte theMode, byte[] adfAID, short adfAIDOff, short adfAIDLen, byte[] nafID, short nafIDOff, short nafIDLen, short keyLength)
    Initializes the GBAUSignature object with the appropriate NAF ID (then Ks_int_NAF Key).
    abstract void
    setInitialDigest(byte[] initialDigestBuf, short initialDigestOffset, short initialDigestLength, byte[] digestedMsgLenBuf, short digestedMsgLenOffset, short digestedMsgLenLength)
    This method initializes the starting hash value in place of the default value used by the GBAUSignature class.
    abstract short
    sign(byte[] inBuff, short inOffset, short inLength, byte[] sigBuff, short sigOffset)
    Generates the signature of all/last input data using Ks_int_NAF linked to NAF ID used in init().
    abstract short
    signPreComputedHash(byte[] hashBuff, short hashOffset, short hashLength, byte[] sigBuff, short sigOffset)
    Generates the signature of the precomputed hash data.
    abstract void
    update(byte[] inBuff, short inOffset, short inLength)
    Accumulates a signature of the input data using Ks_int_NAF linked to NAF ID used in init().
    abstract boolean
    verify(byte[] inBuff, short inOffset, short inLength, byte[] sigBuff, short sigOffset, short sigLength)
    Verifies the signature of all/last input data against the passed in signature using Ks_int_NAF linked to NAF ID used in init().
    abstract boolean
    verifyPreComputedHash(byte[] hashBuff, short hashOffset, short hashLength, byte[] sigBuff, short sigOffset, short sigLength)
    Verifies the signature of precomputed hash data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait