ManageSE

public struct ManageSE

Use case Manage Security Environment - gemSpec_COS#14.9.9

  • Change/Set the Security Environment - gemSpec_COS#14.9.9.1

    Declaration

    Swift

    public static func setEnvironment(number: Int) throws -> HealthCardCommand

    Parameters

    number

    SE identifier 1, 4

    Return Value

    Set environment command

  • Select internal key for symmetric authentication - gemSpec_COS#14.9.9.2

    Declaration

    Swift

    public static func selectInternal(symmetricKey: Key, dfSpecific: Bool, algorithm: PSOAlgorithm) throws
                    -> HealthCardCommand

    Parameters

    symmetricKey

    The key reference

    dfSpecific

    Whether the key is dfSpecific or global

    algorithm

    select the algorithm to be used for the internal authentication (N100.300)

    Return Value

    The select key command

  • Select internal key for asymmetric authentication - gemSpec_COS#14.9.9.3

    Declaration

    Swift

    public static func selectInternal(asymmetricKey: Key, dfSpecific: Bool, algorithm: PSOAlgorithm) throws
                    -> HealthCardCommand

    Parameters

    asymmetricKey

    The key reference

    dfSpecific

    Whether the key is dfSpecific or global

    algorithm

    select the algorithm to be used for the internal authentication (N100.800)

    Return Value

    The select key command

  • Select external key for symmetric authentication - gemSpec_COS#14.9.9.4

    Declaration

    Swift

    public static func selectExternal(symmetricKey: Key, dfSpecific: Bool, algorithm: PSOAlgorithm) throws
                    -> HealthCardCommand

    Parameters

    symmetricKey

    The key reference

    dfSpecific

    Whether the key is dfSpecific or global

    algorithm

    select the algorithm to be used for the internal authentication (N101.300)

    Return Value

    The select key command

  • Select external key for asymmetric authentication - gemSpec_COS#14.9.9.5

    Declaration

    Swift

    public static func selectExternal(referenceKey: Data, algorithm: PSOAlgorithm) throws
                    -> HealthCardCommand

    Parameters

    referenceKey

    The key identifier. Must be 12 bytes long (E.g. GemCvCertificate.CVCBody.certificateHolderReference) (N101.700)

    dfSpecific

    Whether the key is dfSpecific or global

    algorithm

    select the algorithm to be used for the internal authentication (N101.800)

    Return Value

    The select key command

  • Select symmetric key for mutual authentication - gemSpec_COS#14.9.9.6

    Declaration

    Swift

    public static func selectMutual(symmetricKey: Key, dfSpecific: Bool, algorithm: PSOAlgorithm) throws
                    -> HealthCardCommand

    Parameters

    symmetricKey

    The key identifier. (N102.200)

    dfSpecific

    Whether the key is dfSpecific or global

    algorithm

    select the algorithm to be used for the internal authentication (N102.300)

    Return Value

    The select key command

  • Select symmetric key for PACE authentication without specifying the curve - gemSpec_COS#14.9.9.7

    Declaration

    Swift

    public static func selectPACE(symmetricKey: Key, dfSpecific: Bool, oid: ASN1Kit.ObjectIdentifier) throws
                    -> HealthCardCommand

    Parameters

    symmetricKey

    The key Identifier

    dfSpecific

    Whether the key is dfSpecific or global

    oid

    PACE identifier (N102.440)

    Return Value

    The select key command

  • Domain Id parameter = gemSpec_COS#14.9.9.8 N102.454

    See more

    Declaration

    Swift

    public enum DomainId : UInt8
  • Select symmetric key for PACE authentication with domain - gemSpec_COS#14.9.9.8

    Declaration

    Swift

    public static func selectPACE(
            symmetricKey: Key,
            dfSpecific: Bool,
            oid: ASN1Kit.ObjectIdentifier,
            domain: DomainId
    ) throws -> HealthCardCommand

    Parameters

    symmetricKey

    The key Identifier

    dfSpecific

    Whether the key is dfSpecific or global

    oid

    PACE identifier (N102.440)

    domain

    specify the elliptic curve to use

    Return Value

    The select key command

  • Select signing key for signing - gemSpec_COS#14.9.9.9

    Declaration

    Swift

    public static func selectSigning(key: Key, dfSpecific: Bool, algorithm: PSOAlgorithm) throws
                    -> HealthCardCommand

    Parameters

    key

    The key Identifier (N102.700)

    dfSpecific

    Whether the key is dfSpecific or global

    algorithm

    select the algorithm to be used for signing operations (N102.800)

    Return Value

    The select key command

  • Select CVC key - gemSpec_COS#14.9.9.10

    Declaration

    Swift

    public static func selectCVC(referenceKey: Data) throws
                    -> HealthCardCommand

    Parameters

    referenceKey

    The key identifier. Must be 8 bytes long (E.g. GemCvCertificate.CVCBody.certificateAuthorityReference) (N103.200)

    Return Value

    The select key command

  • Select decipher key for decrypting - gemSpec_COS#14.9.9.11

    Declaration

    Swift

    public static func selectDecipher(key: Key, dfSpecific: Bool, algorithm: PSOAlgorithm) throws
                    -> HealthCardCommand

    Parameters

    key

    The key Identifier (N103.600)

    dfSpecific

    Whether the key is dfSpecific or global

    algorithm

    select the algorithm to be used for decipher operations (N103.700)

    Return Value

    The select decipher key command

  • Select encipher key for encrypting - gemSpec_COS#14.9.9.12

    Declaration

    Swift

    public static func selectEncipher(key: Data, algorithm: PSOAlgorithm) throws -> HealthCardCommand

    Parameters

    key

    The key identifier. Must be 12 bytes long (E.g. GemCvCertificate.CVCBody.certificateHolderReference) (N103.840)

    algorithm

    select the algorithm to be used for encipher operations (N103.845)

    Return Value

    The select encipher key command