Link and Contact
Website |
Support |
Copyright © Calypso Networks Association, https://calypsonet.org.
This specification is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0).
You are free to share — copy and redistribute this document in any medium or format for any purpose, even commercially — under the following terms:
-
Attribution — You MUST give appropriate credit to the Calypso Networks Association, provide a link to the license, and indicate if changes were made. You MAY do so in any reasonable manner, but not in any way that suggests the Calypso Networks Association endorses you or your use.
-
NoDerivatives — If you remix, transform, or build upon this document, you MAY NOT distribute the modified material.
No additional restrictions — You MAY NOT apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Implementation grant — The NoDerivatives condition above applies to this specification document only — its text, tables and diagrams. It does not restrict the use of the technical information the document contains. The Calypso Networks Association hereby grants everyone an irrevocable, worldwide, royalty-free permission to use the information contained in this specification to design, develop, and distribute software implementations of this API, in any programming language, under the license of their choice.
The full license text is available at https://creativecommons.org/licenses/by-nd/4.0/.
1. Abstract
This document is the official technical specification of the Terminal Calypso Card API standardised by the Calypso Networks Association (CNA). It defines, in a language-agnostic way (using a notation inspired by the Kotlin language), the interfaces, classes, enumerations, errors, structural relationships and behavioural requirements that any conforming implementation of the Terminal Calypso Card API MUST satisfy.
The Terminal Calypso Card API is the application-facing surface used by terminal applications to operate Calypso transit and ticketing cards. It builds on top of the Terminal Reader API (CNA-TR-API) and delegates every cryptographic operation to a symmetric (CNA-TCCS-API) or asymmetric (CNA-TCCA-API) crypto module.
Document Status
Reference |
261028-SP-CNATerminalAPI-CalypsoCard |
|---|---|
Short name |
CNA-TCC-API |
Version |
3.0.0 |
Revision date |
2026-10-28 |
Editor |
Calypso Networks Association |
Source repository |
https://github.com/calypsonet/calypsonet-terminal-calypso-card-api-spec |
Reference license |
Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) |
| The present document specifies the 3.0.0 of the Terminal Calypso Card API. It defines a single, coherent baseline against which conforming implementations are evaluated; the Since column indicates the version in which each member was introduced. |
Revision List
|
This section lists the high-level changes per version. The complete, fine-grained
changelog is maintained in the |
| Version / Date | Modifications |
|---|---|
v3.0.0 |
Initial edition of this document. |
2. Introduction
2.1. Purpose
The Terminal Calypso Card API defines the public surface used by terminal applications to:
-
select a Calypso card through a CNA-TR-API selection scenario enriched with Calypso-specific commands;
-
operate read-only transactions without involving a crypto module (free transaction);
-
operate fully authenticated transactions using a symmetric crypto module (CNA-TCCS-API) — either in the regular mode (compatible with every Calypso product) or in the extended mode (additional features only available on Calypso Prime Extended);
-
operate fully authenticated transactions using an asymmetric crypto module (CNA-TCCA-API) in PKI mode;
-
expose a dynamic view of the card (
CalypsoCard) updated throughout the transaction.
2.2. Scope
This specification covers:
-
the factory used to instantiate the public types of the API (
CalypsoCardApiFactory); -
the data model of a Calypso card (
CalypsoCard,ElementaryFile,FileHeader,DirectoryHeader, Stored Value log records); -
the selection extension (
CalypsoCardSelectionExtension); -
the family of transaction managers (Free, Secure Regular, Secure Extended, Secure PKI);
-
the symmetric and asymmetric security settings carriers;
-
the Stored Value operations and Search Record Multiple support;
-
the SPIs implemented by crypto modules to plug into the secure transaction managers;
-
the family of errors raised during a Calypso transaction.
The following topics are out of scope:
-
the on-the-wire APDU dialog with the card (handled internally by the implementation);
-
the cryptographic algorithms themselves — only the SPI contract is normative;
-
the on-the-wire transport between the terminal and any remote ticketing system.
2.3. Conformance
A software product conforms to this specification if and only if:
-
it implements every interface and class defined in Chapter 5 with the operations and semantics prescribed in this document,
-
it raises errors exclusively of the types defined in Section 5.6 for the situations described,
-
it preserves the structural relationships described in Chapter 4.
Throughout this specification, the key words MUST, MUST NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY and OPTIONAL are to be interpreted as described in RFC 2119 and RFC 8174 when, and only when, they appear in all capitals.
In conformance with RFC 2119, SHALL is equivalent to MUST; this specification uses MUST exclusively in order to avoid ambiguity.
2.4. Document Conventions
2.4.1. Naming
Type names follow UpperCamelCase; operation, parameter and enumeration-member names follow lowerCamelCase
except for enumeration values which use UPPER_SNAKE_CASE. Names defined by this specification are reproduced
as-is in the UML class diagram (Section 4.4).
2.4.2. Data types
The following type names, whose notation is inspired by the Kotlin language, are used in operation signatures and are mapped, in each binding, to the closest equivalent native type. Implementations MUST preserve the semantic intent rather than the syntactic form.
| Type | Description | Typical bindings |
|---|---|---|
|
Sequence of characters, UTF-8 encoded by default. |
|
|
Two-state truth value. |
|
|
Signed 8-bit value. |
|
|
Signed 16-bit integer. |
|
|
Signed 32-bit integer. |
|
|
Ordered sequence of octets. |
|
|
Ordered collection of |
|
|
Unordered collection of unique |
|
|
Associative array binding keys of type |
|
|
Associative array sorted by key. |
|
|
Value of any type, root of the type hierarchy. |
|
|
Nullable value: either a |
|
|
Absence of value, the alternative held by a nullable type. |
|
|
Own type of the receiver: a fluent operation returns the instance it was called on. |
|
|
Indicates that an operation returns no value. |
|
2.4.3. Type tables
Each interface, class, enumeration and error defined in this document is described by a table of the form:
Name |
The type’s normalized name. |
|---|---|
Kind |
The category of the type (interface, class, enumeration, error, etc.). |
Namespace |
The namespace in which the type is defined. |
Extends |
The type extended by this type, when applicable. |
Implements |
The interface implemented by this type, when applicable. |
Since |
The version of the API in which the type was introduced. |
Purpose |
A normative description of the type’s responsibility. |
See also |
Cross-references to related operations or types, each a hyperlink to the corresponding table. Present only when applicable. |
The Purpose row states, in one or two sentences, the responsibility of the type and the way an instance is obtained. It is meant to be scanned, not read: any content that requires structure or depth — rules, lists, notes, value tables or examples — is placed as prose below the table.
2.4.4. Operation tables
Each operation defined in this document is described by a table of the form:
Signature |
The operation’s signature. |
|---|---|
Since |
The version of the API in which the operation was introduced. |
Description |
A normative description of the operation’s behaviour. |
Parameters |
A description of each input parameter. |
Returns |
A description of the returned value, if any. |
Pre-conditions |
The conditions the caller MUST satisfy before invoking the operation, each prefixed by its nature. |
Errors |
A list of error conditions a correct caller must handle, each mapped to a specific error type. |
See also |
Cross-references to related operations or types, each a hyperlink to the corresponding table. Present only when applicable. |
2.4.5. Operation contracts
To avoid repetition, the following rules apply to every operation table in Chapter 5 and are therefore not restated for each operation:
-
Pre-conditions. The Pre-conditions row states what the caller MUST guarantee before invoking the operation. Violating one is a contract error, never listed in the Errors row, which describes only the outcomes a correct caller must handle. Each entry is prefixed by its nature, which determines the error raised when the condition is not met:
-
Argument — an illegal argument error. Applies to any invalid argument, including values bounded by a card or SAM protocol.
-
Range — an index out of bounds error. Applies when the argument designates a position within a collection or memory image exposed by the API.
-
State — an illegal state error.
-
Capability — an unsupported operation error.
-
-
Non-
nullresults. Unless the return type is marked nullable (T?) or the Returns row states otherwise, an operation returns a non-nullvalue. -
Collections. Unless the return type is marked nullable (
T?), an operation whose return type is a collection (e.g.List,Set,Map) returns an empty collection rather thannull. -
Fluent composition. Builder-style operations return the current instance so that calls can be chained.
2.4.6. Concurrency
Unless explicitly stated otherwise, the stateful types defined by this specification are not thread-safe. A given instance MUST be accessed from a single thread at a time; concurrent use of the same instance without external synchronisation results in undefined behaviour. Distinct instances MAY be used concurrently.
2.5. References and Resources
2.5.1. Calypso References
References to CNA Terminal APIs designate the indicated major version; any later release within the same major is backward-compatible per that API’s evolution policy.
| Reference | Document |
|---|---|
CNA Terminal API — Reader (SP-CNATerminalAPI-Reader), version 3.0, Calypso Networks Association. |
|
CNA Terminal API — Calypso Crypto Symmetric (SP-CNATerminalAPI-CalypsoCryptoSymmetric), version 0.1, Calypso Networks Association. |
|
CNA Terminal API — Calypso Crypto Asymmetric (SP-CNATerminalAPI-CalypsoCryptoAsymmetric), version 0.2, Calypso Networks Association. |
2.5.2. Normative References
| Reference | Document |
|---|---|
Key words for use in RFCs to Indicate Requirement Levels, S. Bradner, March 1997. |
|
Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words, B. Leiba, May 2017. |
|
2.5.3. External Resources
| Resource | Link |
|---|---|
Calypso Networks Association |
|
Terminal APIs website |
|
Terminal APIs documentation |
3. Glossary and Acronyms
3.1. Glossary
| Term | Definition |
|---|---|
Anti-passback |
Minimum delay imposed by the transport operator between two uses of the same card. |
Calypso Card |
Smart card compliant with the Calypso specifications. |
Secure Session |
Authenticated and integrity-protected exchange between the terminal and the card. |
Regular Mode |
Secure session mode compatible with every Calypso product. |
Extended Mode |
Secure session mode supporting additional features (early mutual authentication, encryption of session APDUs, larger sessions). Available on Calypso Prime Extended. |
PKI Mode |
Secure session mode using asymmetric cryptography (Calypso 3.3+). |
Stored Value (SV) |
Calypso feature exposing a card-resident monetary counter. |
Crypto Module |
Component implementing the SPI exposed by CNA-TCCS-API or CNA-TCCA-API. |
KIF / KVC |
Calypso Key Identifier / Key Version Code. |
HCE |
Host Card Emulation. |
3.2. Acronyms
| Abbreviation | Expansion |
|---|---|
AID |
Application IDentifier |
APDU |
Application Protocol Data Unit |
CNA |
Calypso Networks Association |
CSN |
Calypso Serial Number (Application Serial Number) |
DF |
Dedicated File |
EF |
Elementary File |
FCI |
File Control Information |
FCP |
File Control Parameters |
HCE |
Host Card Emulation |
KIF |
Key Identifier |
KVC |
Key Version Code |
LID |
Long IDentifier (file id) |
MAC |
Message Authentication Code |
PIN |
Personal Identification Number |
PKI |
Public Key Infrastructure |
SAM |
Secure Application Module |
SFI |
Short File Identifier |
SPI |
Service Provider Interface |
SV |
Stored Value |
UML |
Unified Modelling Language |
4. Architectural Overview
4.1. Functional positioning
4.2. Logical namespaces
| Namespace | Role | Summary |
|---|---|---|
|
Public API |
Factory, properties, enumerations ( |
|
Public API |
Data model of a Calypso card: |
|
Public API |
Transaction managers (Free / Secure Regular / Secure Extended / Secure PKI), security settings carriers, |
|
SPI |
Marker interfaces implemented by crypto extensions ( |
4.3. Command exchange duration bounds
As a countermeasure against relay attacks, the security settings allow the integrator to bound the duration of the
most sensitive command exchanges: a relay adds a transmission delay, so that an abnormally long exchange can reveal that
the card is not actually present in front of the reader. The bounds are declared through the assign…MaxDuration…
operations of SecuritySettings, the parent of
SymmetricCryptoSecuritySettings and
AsymmetricCryptoSecuritySettings, each available in a CSN-based
(…ByCsn) and an FCI-based (…ByFci) form.
4.3.1. Measured duration
Each bound applies to a single command exchange, measured from the transmission of the command to the reception of its response; the other commands of the secure session or of the Stored Value operation are not included. The bounded exchanges are:
-
the Open Secure Session command (
assignOpenSecureSessionMaxDuration…); -
the Close Secure Session command (
assignCloseSecureSessionMaxDuration…); -
the SV Reload, SV Debit or SV Undebit command (
assignSvCommandMaxDuration…, symmetric security settings only).
Durations are expressed in microseconds. The effective resolution of the measurement depends on the reader and on the execution platform, and a bound finer than that resolution cannot be relied upon.
The settings are recorded separately for each security settings instance and for each kind of bounded command exchange.
4.3.2. Resolution rule
For a given card, the applicable bound is determined as follows:
-
CSN-based settings. Each
…ByCsn(…)call defines a range bounded by itscsnMinand the immediately higher declaredcsnMin(or+∞for the highest threshold). If the card’s CSN belongs to a range and themaxDurationof that range is notLong.MAX_VALUE, this value applies and the resolution stops. -
FCI-based settings. Otherwise, the
…ByFci(…)settings are evaluated in their declaration order and the first one whosefciRegexmatches the card’s FCI applies; amaxDurationequal toLong.MAX_VALUEthen means that no bound applies. -
Otherwise, no bound applies.
CSN-based settings therefore act as overrides of the FCI-based settings. A default bound for every card is expressed
by a last FCI-based setting with the expression .*, not by a CSN-based setting with the lowest csnMin, which would
shadow every FCI-based setting. Assigning Long.MAX_VALUE to a CSN range hands the decision back to the FCI-based
settings for the cards of that range. The CSN-based mechanism allows the integrator to introduce or tighten duration
bounds progressively as new generations of cards (with higher CSNs) are issued.
4.3.3. Behaviour on overrun
When the effective duration of a bounded command exchange exceeds the applicable bound, the exchange is reported as
failed and the error is propagated to the application as an InvalidCardResponse (CNA-TR-API).
-
A secure session is open. The session MUST be cancelled automatically before the error is propagated, so that no modification performed during the session is validated by the card.
-
No secure session is open (a Stored Value command executed outside a session). There is nothing to cancel: only the error is propagated, and the ticketing application decides what to do according to its own context (for example retrying the operation, rejecting the card or raising an alert).
4.3.4. Card serial number
The card serial number (CSN) is the Application Serial Number (see
getApplicationSerialNumber()) interpreted as an unsigned 64-bit
big-endian integer; csnMin is interpreted as the same unsigned 64-bit value, so that the comparison is unsigned.
4.3.5. FCI matching
-
The FCI is the data returned by the Select Application command (see
IsoSmartCard.getSelectApplicationResponse()in CNA-TR-API), excluding the status word. When no FCI is available, no FCI-based setting matches. -
The FCI is represented as an uppercase hexadecimal string without separators (two characters per byte).
-
The match is complete: the whole string MUST match the expression, as if it were anchored at both ends. Since
.matches a single hexadecimal digit, a byte is matched by... -
To remain portable across implementation languages, the expression MUST be restricted to the following subset: literal characters,
., character classes[…](including ranges and negation), the quantifiers*,+,?,{n},{n,}and{n,m}, the alternation|and the groups(…). Backreferences, lookaround assertions, anchors and inline flags are excluded.
4.3.6. FCI integrity
The FCI is obtained during the card selection, outside any secure session, and is therefore not authenticated. When an
expression filters on the startup information data contained in the FCI, the integrator MUST schedule a
prepareGetData(FCI_FOR_CURRENT_DF) inside the secure session, so that the
integrity of the FCI obtained during the selection is guaranteed by the session: the following processCommands()
raises InconsistentData if the returned FCI differs from the one obtained during the
selection.
4.3.7. Duplicates
A …ByCsn(…) call with an already declared csnMin replaces the previous value. A …ByFci(…) call with an
already declared fciRegex (identical character string) replaces the previous value and keeps its position in the
evaluation order.
4.4. UML class diagram
The following UML class diagram provides a visual representation of the types and relationships defined by this specification:
5. API Specification
5.1. Constants
5.1.1. Calypso Card API Properties
Name |
|
|---|---|
Kind |
Constants |
Namespace |
|
Since |
1.0 |
Purpose |
Exposes the immutable properties of the Terminal Calypso Card API. |
| Name | Type | Since | Description |
|---|---|---|---|
|
|
1.0 |
String representation of the version of the API implemented by the conforming binding.
The value is a dotted decimal of the form |
5.2. Data
5.2.1. Directory Header
Name |
|
|---|---|
Kind |
Data |
Namespace |
|
Since |
1.0 |
Purpose |
Carries the metadata of a Calypso DF. |
| Name | Type | Default | Since | Description |
|---|---|---|---|---|
|
|
— |
1.0 |
LID, the 2-byte identifier of the associated file structure (DF or EF). |
|
|
— |
1.0 |
Status byte of the DF (Dedicated File) described by this header. |
|
|
— |
1.0 |
Access conditions of the DF. Non-empty. |
|
|
— |
1.0 |
Key indexes of the DF. Non-empty. |
|
|
— |
1.0 |
KIF of each write access level, indexed by |
|
|
— |
1.0 |
KVC of each write access level, indexed by |
5.2.2. Elementary File
Name |
|
|---|---|
Kind |
Data |
Namespace |
|
Since |
1.0 |
Purpose |
Calypso Elementary File. Carries an |
| Name | Type | Default | Since | Description |
|---|---|---|---|---|
|
|
— |
1.0 |
Short File Identifier (SFI) of this Elementary File. |
|
— |
1.0 |
Metadata of the file. |
|
|
|
— |
3.0 |
Known content of every record, indexed by record number. For a binary file, the whole content is carried by record #1. Empty when no record content is known; a record absent from the map has not been read. |
5.2.3. File Header
Name |
|
|---|---|
Kind |
Data |
Namespace |
|
Since |
1.0 |
Purpose |
Carries the metadata of a Calypso EF. |
| Name | Type | Default | Since | Description |
|---|---|---|---|---|
|
|
— |
1.0 |
LID, the 2-byte identifier of the associated file structure (DF or EF). |
|
|
— |
1.0 |
DF status. |
|
— |
1.0 |
Type of this Elementary File (EF). |
|
|
|
— |
1.0 |
Number of records. Always |
|
|
— |
1.0 |
Size of a record. For a counter file, the original size of record #1; the extra bytes — the remainder of the division of the file size by 3 — are not accessible. For a binary file, the size of the file. |
|
|
— |
1.0 |
Access conditions. Empty when not available. |
|
|
— |
1.0 |
Key indexes. Empty when not available. |
|
|
— |
1.0 |
Non-zero unique identifier of the shared data when the file data is shared, |
5.2.4. Search Command Data
Name |
|
|---|---|
Kind |
Data |
Namespace |
|
Since |
1.1 |
Purpose |
Carries the search criteria of |
| Name | Type | Default | Since | Description |
|---|---|---|---|---|
|
|
— |
1.1 |
SFI of the EF in which the search is performed. |
|
|
— |
1.1 |
Byte sequence to search for within the targeted record. |
|
|
|
1.1 |
Record number at which the search begins. |
|
|
|
1.1 |
Offset, in bytes, at which the analysis starts within each record. |
|
|
|
1.1 |
When true, the data is analysed at |
|
|
|
1.1 |
Comparison mask specifying precisely the bits to take into account in the comparison. Its length MUST be
|
|
|
|
1.1 |
When true, the content of the first matching record is fetched into the |
5.2.5. SV Debit Log Record
Name |
|
|---|---|
Kind |
Data |
Namespace |
|
Since |
1.0 |
Purpose |
One record of a Stored Value debit log. |
| Name | Type | Default | Since | Description |
|---|---|---|---|---|
|
|
— |
1.0 |
2-byte debit date. Non-empty. |
|
|
— |
1.0 |
2-byte debit time. Non-empty. |
|
|
— |
1.0 |
Debit amount. |
|
|
— |
1.0 |
SV balance after the debit. |
|
|
— |
1.0 |
KVC of the debit key. |
|
|
— |
1.0 |
4-byte SAM ID. Non-empty. |
|
|
— |
1.0 |
SAM transaction number. |
|
|
— |
1.0 |
SV transaction number. |
5.2.6. SV Load Log Record
Name |
|
|---|---|
Kind |
Data |
Namespace |
|
Since |
1.0 |
Purpose |
One record of a Stored Value load log. |
| Name | Type | Default | Since | Description |
|---|---|---|---|---|
|
|
— |
1.0 |
2-byte load date. Non-empty. |
|
|
— |
1.0 |
2-byte load time. Non-empty. |
|
|
— |
1.0 |
Load amount. |
|
|
— |
1.0 |
SV balance after the load. |
|
|
— |
1.0 |
2-byte free data. Non-empty. |
|
|
— |
1.0 |
KVC of the load key. |
|
|
— |
1.0 |
4-byte SAM ID. Non-empty. |
|
|
— |
1.0 |
SAM transaction number. |
|
|
— |
1.0 |
SV transaction number. |
5.3. API Interfaces
5.3.1. Asymmetric Crypto Security Settings
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.1 |
Purpose |
Security settings carrier for PKI Calypso card transactions. An instance is obtained via |
Add CA Certificate
Signature |
|
|---|---|
Since |
2.1 |
Description |
Registers a CA certificate. The issuer’s certificate MUST be loaded first. Preloading a CA certificate avoids having to read it from the card. Various checks are performed to ensure the integrity and validity of the supplied CA certificate: verification of the certificate’s signature using the issuer’s public key, check of the validity period to ensure the certificate is neither expired nor prematurely valid, confirmation of the authenticity of the issuer and subject details, and compliance with any constraints or extensions required for CA certificates. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
See also |
Add CA Certificate Parser
Signature |
|
|---|---|
Since |
2.1 |
Description |
Registers a CA certificate parser, used when the CA certificate is not already available. The parser provides the means to build a CA certificate from the raw data read from the card. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Add Card Certificate Parser
Signature |
|
|---|---|
Since |
2.1 |
Description |
Registers a card certificate parser. The parser provides the means to build a card certificate from the raw data read from the card. Only one parser MAY be registered per certificate type. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Add PCA Certificate
Signature |
|
|---|---|
Since |
2.1 |
Description |
Registers a self-signed PCA certificate. Various checks are performed to ensure the integrity and validity of the supplied PCA certificate: verification of the certificate’s signature to ensure it is self-signed, check of the validity period to ensure the certificate is neither expired nor prematurely valid, confirmation of the authenticity of the issuer and subject details, and compliance with any constraints or extensions required for PCA certificates. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
5.3.2. Calypso Card
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
1.0 |
Purpose |
Dynamic view of the card’s content, updated from selection to the end of the transaction. |
An instance of CalypsoCard is obtained by casting the IsoSmartCard object produced by the selection process
defined in CNA-TR-API.
A CalypsoCard carries: application identification (revision, class, DF name, serial number, ATR, issuer), the indication of optional features (Stored Value, PIN, Rev 3.2 mode, ratification management), the management information of the modification buffer, the invalidation status and the files / counters / SV data read or modified during the transaction.
The CalypsoCard instance bound to a transaction is a dynamic view of the card image, updated after every successful command.
Failed write commands do not update the in-memory image.
Get Application Serial Number
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the Application Serial Number, an 8-byte value uniquely identifying the card application. |
Returns |
A non-empty |
Pre-conditions |
None. |
Errors |
None. |
Get Application Subtype
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the application subtype byte, which references the card’s file structure. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get Application Type
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the application type byte, which encodes the product type together with its options. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get CA Certificate
Signature |
|
|---|---|
Since |
2.1 |
Description |
CA certificate; empty if not available. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get Card Certificate
Signature |
|
|---|---|
Since |
2.1 |
Description |
Card certificate; empty if not available. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get Card Public Key
Signature |
|
|---|---|
Since |
2.1 |
Description |
Card public key; empty if not available. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get Counter Values By LID
Signature |
|
|---|---|
Since |
3.0 |
Description |
Values of the counters carried by the EF whose LID matches, indexed by counter number. Each value is decoded
from the 3-byte slice at offset |
Parameters |
|
Returns |
A |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Get Counter Values By SFI
Signature |
|
|---|---|
Since |
3.0 |
Description |
Values of the counters carried by the EF whose SFI matches, indexed by counter number. Each value is decoded
from the 3-byte slice at offset |
Parameters |
|
Returns |
A |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Get DF Name
Signature |
|
|---|---|
Since |
1.0 |
Description |
DF name (5 to 16 bytes), as per ISO/IEC 7816-4. It also corresponds to the complete representation of the target covered by the AID value supplied in the selection command: the AID selects the application by specifying all or part of the targeted DF name (5 bytes minimum). |
Returns |
A non-empty |
Pre-conditions |
None. |
Errors |
None. |
Get Directory Header
Signature |
|
|---|---|
Since |
1.0 |
Description |
Metadata of the current DF; |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get File By LID
Signature |
|
|---|---|
Since |
1.0 |
Description |
EF whose LID matches; Note that when a secure session is running, the returned object carries all in-session modifications, which are rolled back if the secure session fails. |
Parameters |
|
Returns |
An |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Get File By SFI
Signature |
|
|---|---|
Since |
1.0 |
Description |
EF whose SFI matches; Note that when a secure session is running, the returned object carries all in-session modifications, which are rolled back if the secure session fails. |
Parameters |
|
Returns |
An |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Get Files
Signature |
|
|---|---|
Since |
1.1 |
Description |
All known EFs of the current DF. During a secure session, this set reflects every in-session modification (which is rolled back on session failure). |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get Matching Record Numbers
Signature |
|
|---|---|
Since |
3.0 |
Description |
Numbers of the records that matched the search command prepared with this identifier. When several search commands share the same identifier, the numbers returned are those of the most recently processed one. |
Parameters |
|
Returns |
A |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
See also |
Get PIN Attempt Remaining
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the number of PIN presentation attempts still remaining before the PIN becomes blocked. |
Returns |
An |
Pre-conditions |
State — the PIN has been checked. |
Errors |
None. |
See also |
|
Get Platform
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the platform identification byte, which references the card’s chip. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get Product Type
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the card product type ( |
Returns |
|
Pre-conditions |
None. |
Errors |
None. |
Get Session Modification
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the session modification byte, which — depending on the card — caps either the number of bytes modifiable or the number of write commands allowed within a secure session. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get Software Issuer
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the software issuer byte, identifying the issuer of the card’s embedded software. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get Software Revision
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the software revision byte of the card’s embedded software. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get Software Version
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the software version byte of the card’s embedded software. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Get Startup Info Raw Data
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the raw Calypso startup information block — the sequence of bytes from which the individual startup fields (platform, application type and subtype, software issuer, version and revision, etc.) are derived. |
Returns |
A non-empty |
Pre-conditions |
None. |
Errors |
None. |
Get SV Balance
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the current Stored Value (SV) balance held by the card, expressed in its monetary unit. |
Returns |
An |
Pre-conditions |
State — an SV Get command has been executed. |
Errors |
None. |
See also |
|
Get SV Debit Log All Records
Signature |
|
|---|---|
Since |
1.0 |
Description |
All SV debit log records read from the card. Each call returns snapshots decoded from the values returned by |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get SV Debit Log All Records Raw Data
Signature |
|
|---|---|
Since |
3.0 |
Description |
Returns the raw bytes of all SV debit log records read from the card. The list returned by |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
Get SV Debit Log Last Record
Signature |
|
|---|---|
Since |
1.0 |
Description |
Last SV debit log record; |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get SV Debit Log Last Record Raw Data
Signature |
|
|---|---|
Since |
3.0 |
Description |
Returns the raw bytes of the last SV debit log record; |
Returns |
The non-empty raw bytes of the record, or |
Pre-conditions |
None. |
Errors |
None. |
See also |
Get SV Last T Num
Signature |
|
|---|---|
Since |
1.0 |
Description |
Returns the number of the last Stored Value (SV) transaction recorded on the card. |
Returns |
An |
Pre-conditions |
State — an SV Get command has been executed. |
Errors |
None. |
See also |
|
Get SV Load Log Record
Signature |
|
|---|---|
Since |
1.0 |
Description |
Last SV load log record; |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get SV Load Log Record Raw Data
Signature |
|
|---|---|
Since |
3.0 |
Description |
Returns the raw bytes of the last SV load log record; |
Returns |
The non-empty raw bytes of the record, or |
Pre-conditions |
None. |
Errors |
None. |
See also |
Get Traceability Information
Signature |
|
|---|---|
Since |
1.1 |
Description |
Traceability information (software issuer ID and discretionary data); empty if not available. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Get Transaction Counter
Signature |
|
|---|---|
Since |
1.2 |
Description |
Transaction counter from the output of the last successful Open Secure Session. Note: commands such as Change Key, Change/Verify PIN, SV Debit/Undebit/Reload decrement the card counter but do not update this returned value. |
Returns |
An |
Pre-conditions |
State — a secure session is open. |
Errors |
None. |
See also |
|
Is DF Invalidated
Signature |
|
|---|---|
Since |
1.0 |
Description |
Tells whether the current DF is invalidated. The invalidation status is determined either from the response to the Select Application command or from the response to a Select File (DF) command. For a |
Returns |
|
Pre-conditions |
None. |
Errors |
None. |
Is DF Ratified
Signature |
|
|---|---|
Since |
1.0 |
Description |
Tells whether the last session has been ratified. |
Returns |
A |
Pre-conditions |
State — a secure session is open. |
Errors |
None. |
See also |
|
Is Extended Mode Supported
Signature |
|
|---|---|
Since |
1.0 |
Description |
Indicates whether the Extended Mode is supported. This indication is initially interpreted from the Application Type byte, but MAY be updated once the secure session is opened: depending on the type of key used, the extended mode functionalities may not be available (for example with a non-AES key). |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Is HCE
Signature |
|
|---|---|
Since |
1.0 |
Description |
Indicates whether the card is a Calypso HCE. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Is PIN Blocked
Signature |
|
|---|---|
Since |
1.0 |
Description |
Indicates whether the PIN is blocked. |
Returns |
A |
Pre-conditions |
State — the PIN has been checked. |
Errors |
None. |
See also |
|
Is PIN Feature Available
Signature |
|
|---|---|
Since |
1.0 |
Description |
Indicates whether the Calypso PIN feature is available. This indication is interpreted from the Application Type byte. |
Returns |
|
Pre-conditions |
None. |
Errors |
None. |
Is PKI Mode Supported
Signature |
|
|---|---|
Since |
1.0 |
Description |
Indicates whether Public Key Authentication is supported. This indication is interpreted from the Application Type byte. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Is Ratification On Deselect Supported
Signature |
|
|---|---|
Since |
1.0 |
Description |
Indicates whether ratification happens on deselect (ratification command not required). This indication is interpreted from the Application Type byte. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Is SV Feature Available
Signature |
|
|---|---|
Since |
1.0 |
Description |
Indicates whether the SV feature is available. This indication is interpreted from the Application Type byte. |
Returns |
|
Pre-conditions |
None. |
Errors |
None. |
5.3.3. Calypso Card API Factory
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Since |
2.0 |
Purpose |
Factory used to obtain instances of every public type provided by the API. |
Create Asymmetric Crypto Security Settings
Signature |
|
|---|---|
Since |
2.1 |
Description |
Creates the |
Parameters |
|
Returns |
|
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Create Calypso Card Selection Extension
Signature |
|
|---|---|
Since |
2.0 |
Description |
Creates a |
Returns |
|
Pre-conditions |
None. |
Errors |
None. |
Create Free Transaction Manager
Signature |
|
|---|---|
Since |
2.0 |
Description |
Creates a |
Parameters |
|
Returns |
|
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Create Secure Extended Mode Transaction Manager
Signature |
|
|---|---|
Since |
2.0 |
Description |
Creates a |
Parameters |
|
Returns |
|
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Create Secure PKI Mode Transaction Manager
Signature |
|
|---|---|
Since |
2.1 |
Description |
Creates a |
Parameters |
|
Returns |
|
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Create Secure Regular Mode Transaction Manager
Signature |
|
|---|---|
Since |
2.0 |
Description |
Creates a |
Parameters |
|
Returns |
|
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Create Symmetric Crypto Security Settings
Signature |
|
|---|---|
Since |
2.0 |
Description |
Creates the |
Parameters |
|
Returns |
|
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
5.3.4. Calypso Card Selection Extension
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Enriches the CNA-TR-API selection scenario with Calypso-specific commands and pre-opening of a secure session. An instance is obtained via |
By default the selection rejects PRIME revision 3 cards that have been invalidated.
The application MUST call
acceptInvalidatedCard to stop ignoring them.
For earlier revisions, the application MAY have to handle invalidation itself (typically via a Select File on the DF).
For all prepare* operations, unless otherwise specified, the following parameter ranges apply:
| Parameter | Range |
|---|---|
SFI |
|
Record number |
|
Counter number |
|
Counter value |
|
Offset |
|
Input data length |
|
Accept Invalidated Card
Signature |
|
|---|---|
Since |
1.0 |
Description |
Requests to accept invalidated cards during the selection stage. Works only with cards that indicate their invalidation status at the time of selection (e.g., all PRIME Revision 3+ cards and certain PRIME Revision 2 cards). |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Prepare Get Data
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds a Get Data command for the supplied tag. This is the way to obtain FCI information when it is not supplied directly by Select Application (e.g. the OMAPI case). Caution: the resulting APDU command is compliant with PRIME revision 3 cards. It may therefore be rejected by some earlier revision cards. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Pre Open Secure Session
Signature |
|
|---|---|
Since |
1.7 |
Description |
Adds a specific Open Secure Session command attempting a pre-opening. Enables a future single-exchange session execution by anticipating the APDU responses. The objective of the pre-opening is to allow the grouping of all the commands of a secure session. It is only relevant for a distributed system where the ticketing processing is done remotely, so that a complete secure session can be carried out in a single exchange between the server and the terminal. To achieve that single exchange, all the data that will have to be read in session MUST first be read locally,
outside the session — otherwise additional exchanges take place. The remote ticketing processing then prepares
all the commands of the session, from opening to closing, before executing it: The mechanism is ineffective if:
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Read Binary
Signature |
|
|---|---|
Since |
1.7 |
Description |
Adds one or more Read Binary commands to read all or part of the supplied binary EF. Once processed, the
result is available in the Caution: the resulting APDU command is compliant with PRIME revision 3 cards. It may therefore be rejected by some earlier revision cards. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Read Counter
Signature |
|
|---|---|
Since |
1.7 |
Description |
Adds a Read Records command to read a part of a record of the supplied EF, which SHOULD be a counter file. The
record is read up to the supplied counter number, so all preceding counters are also read. Once processed, the
result is available in the Caution: the resulting APDU command is compliant with PRIME revision 3 cards. It may therefore be rejected by some earlier revision cards. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Read Record
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds a Read Records command for a single record of a linear or cyclic EF. Once processed, the result is
available in the Caution: the resulting APDU command is compliant with PRIME revision 3 cards. It may therefore be rejected by some earlier revision cards. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Select File By Control
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds a Select File command using a navigation control ( Caution: the resulting APDU command is compliant with PRIME revision 3 cards. It may therefore be rejected by some earlier revision cards. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Select File By LID
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds a Select File command targeting an EF by its LID. Caution: PRIME 3 compatible only. The command fails if the selected file is not an EF. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
5.3.5. Free Transaction Manager
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Transaction manager that does not require any cryptographic computation. An instance is obtained via |
FreeTransactionManager does not add any operation.
5.3.6. Secure Extended Mode Transaction Manager
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Symmetric-key transaction manager exposing additional operations only available on Calypso Prime Extended products. An instance is obtained via |
Prepare Activate Encryption
Signature |
|
|---|---|
Since |
2.0 |
Description |
Requests encryption for all following session commands. This ensures data confidentiality and prevents man-in-the-middle attacks. This command only makes sense in the context of a secure session. Encryption is resource intensive and increases transaction times: it is therefore RECOMMENDED to limit it to
the commands that require it. Furthermore, when early mutual authentication is also required, it is RECOMMENDED
for performance reasons to place the
|
Returns |
The current instance ( |
Pre-conditions |
State — a secure session is open and the encryption is not already active. |
Errors |
None. |
See also |
|
Prepare Deactivate Encryption
Signature |
|
|---|---|
Since |
2.0 |
Description |
Requests to stop the encryption, which restores the exchanges with the card to their normal mode. This command only makes sense in the context of a secure session in which encryption of the commands has previously been requested. NOTE: |
Returns |
The current instance ( |
Pre-conditions |
State — a secure session is open and the encryption is active. |
Errors |
None. |
See also |
|
Prepare Early Mutual Authentication
Signature |
|
|---|---|
Since |
2.0 |
Description |
Requests to mutually authenticate the card and the terminal before the secure session is closed. The use of this feature penalises the execution time of the secure session and SHOULD be used only when needed (e.g. before sending sensitive commands). |
Returns |
The current instance ( |
Pre-conditions |
State — a secure session is open. |
Errors |
None. |
See also |
|
5.3.7. Secure PKI Mode Transaction Manager
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.1 |
Purpose |
Asymmetric-key transaction manager, compatible with Calypso cards in PKI mode. An instance is obtained via |
Prepare Open Secure Session
Signature |
|
|---|---|
Since |
2.1 |
Description |
Schedules an Open Secure Session command in PKI mode. If the next prepared command is a Read One Record or Read One Or More Counters, it will be merged with the session opening for optimisation. |
Returns |
The current instance ( |
Pre-conditions |
State — no secure session is already open. |
Errors |
None. |
5.3.8. Secure Regular Mode Transaction Manager
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Symmetric-key transaction manager compatible with every Calypso product. An instance is obtained via |
No additional operation declared.
5.3.9. Secure Symmetric Crypto Transaction Manager
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Common operations for every transaction manager backed by symmetric cryptography. |
Prepare Change Key
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules a Change Key command. MUST be performed outside a secure session. All KIFs/KVCs MUST be available in the crypto module. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Invalidate
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules an Invalidate command, which marks the card application as invalidated, blocking further use until
it is rehabilitated. This command is usually executed within a secure session with the |
Returns |
The current instance ( |
Pre-conditions |
State — the card is not already invalidated. |
Errors |
|
Prepare Open Secure Session
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules an Open Secure Session command. The secure session is opened with the supplied
If the next prepared command is a Read One Record or Read One Or More Counters, it is merged with the
session opening for optimisation, unless the pre-open mode is active or the read-merge optimisation has been
disabled. This mechanism may in some cases be incompatible with the security constraints; it can then be
disabled via
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
See also |
Prepare Rehabilitate
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules a Rehabilitate command, which clears the card application’s invalidation status, making it usable
again. This command is usually executed within a secure session with the |
Returns |
The current instance ( |
Pre-conditions |
State — the card is invalidated. |
Errors |
|
Prepare SV Debit
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules an SV Debit command, which decreases the current SV balance by the supplied amount. Amount:
The key used is the debit key. Once processed, the data is available in the
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare SV Get
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules an SV Get command, which reads the Stored Value data (balance and logs) that MUST immediately
precede any SV debit, undebit or reload: no other command may be prepared between them. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare SV Reload
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules an SV Reload command. Amount range: |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare SV Undebit
Signature |
|
|---|---|
Since |
3.0 |
Description |
Schedules an SV Undebit command, which cancels, totally or partially, a previous debit by increasing the current
SV balance by the supplied amount. Amount: The key used is the debit key. Once processed, the data is available in the
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
5.3.10. Secure Transaction Manager
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Common operations for every secure (cryptographically-backed) transaction manager. |
Get Crypto Extension
Signature |
|
|---|---|
Since |
2.0 |
Description |
Returns the Commands prepared through the crypto extension are queued together with the card commands, in call order, and are
processed by the same |
Returns |
The crypto extension of this card transaction. |
Pre-conditions |
None. |
Errors |
None. |
Prepare Cancel Secure Session
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules a special Close Secure Session command aborting the current secure session. Executed in safe mode — never raises errors. |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Prepare Close Secure Session
Signature |
|
|---|---|
Since |
2.0 |
Description |
Schedules a Close Secure Session command. The ratification mechanism is disabled by default but MAY be enabled
via |
Returns |
The current instance ( |
Pre-conditions |
State — a secure session is open or its opening is prepared, and neither a closing nor a cancelling is already prepared. |
Errors |
None. |
5.3.11. Security Settings
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Since |
3.0 |
Purpose |
Settings shared by every Calypso card secure transaction, whatever the cryptographic nature of the secure session: duration bounds of the bounded command exchanges (see Command exchange duration bounds) and tolerance of a missing file or record inside a secure session. Implemented by |
Assign Close Secure Session Max Duration By CSN
Signature |
|
|---|---|
Since |
3.0 |
Description |
Sets the maximum duration (in microseconds) of the Close Secure Session command exchange for the cards whose CSN falls within the range starting at
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign Close Secure Session Max Duration By FCI
Signature |
|
|---|---|
Since |
3.0 |
Description |
Sets the maximum duration (in microseconds) of the Close Secure Session command exchange for the cards whose FCI matches |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign Open Secure Session Max Duration By CSN
Signature |
|
|---|---|
Since |
3.0 |
Description |
Sets the maximum duration (in microseconds) of the Open Secure Session command exchange for the cards whose CSN falls within the range starting at
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign Open Secure Session Max Duration By FCI
Signature |
|
|---|---|
Since |
3.0 |
Description |
Sets the maximum duration (in microseconds) of the Open Secure Session command exchange for the cards whose FCI matches |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Authorize File Not Found Error
Signature |
|
|---|---|
Since |
3.0 |
Description |
Allows the card to answer that a file does not exist (status word This setting is useful for heterogeneous card fleets, where the presence of a file or of a record cannot be known
in advance. See |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Authorize Record Not Found Error
Signature |
|
|---|---|
Since |
3.0 |
Description |
Allows the card to answer that a record does not exist (status word This setting is useful for heterogeneous card fleets, where the presence of a file or of a record cannot be known
in advance. See |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
5.3.12. Symmetric Crypto Security Settings
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Security settings carrier for symmetric-key Calypso card transactions (e.g. SAM-backed). An instance is obtained via |
Add Authorized Session Key
Signature |
|
|---|---|
Since |
2.0 |
Description |
Adds an authorised session key. Default: every key accepted; once at least one key is added, only listed keys are accepted. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Add Authorized SV Key
Signature |
|
|---|---|
Since |
2.0 |
Description |
Adds an authorised Stored Value (SV) key, identified by its KIF/KVC. Default: every SV key accepted; once at least one key is added, only listed keys are accepted. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign Default KIF
Signature |
|
|---|---|
Since |
2.0 |
Description |
Defines the default KIF for a write access level. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign Default KVC
Signature |
|
|---|---|
Since |
2.0 |
Description |
Defines the default KVC for a write access level. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign KIF
Signature |
|
|---|---|
Since |
2.0 |
Description |
Defines, for a write access level, the KIF to use when the card only provides a KVC. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign SV Command Max Duration By CSN
Signature |
|
|---|---|
Since |
3.0 |
Description |
Sets the maximum duration (in microseconds) of an SV Reload, SV Debit or SV Undebit command exchange for the cards whose CSN falls within the range starting at
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Assign SV Command Max Duration By FCI
Signature |
|
|---|---|
Since |
3.0 |
Description |
Sets the maximum duration (in microseconds) of an SV Reload, SV Debit or SV Undebit command exchange for the cards whose FCI matches |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Authorize SV Negative Balance
Signature |
|
|---|---|
Since |
2.0 |
Description |
Allows the SV balance to become negative. Default: disabled. |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Disable Read On Session Opening
Signature |
|
|---|---|
Since |
2.0 |
Description |
Disables the automatic merging of Open Secure Session with a possible Read Record command. By default, the optimisation is performed; it may however be incompatible with the security requirements in some cases. |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Enable Multiple Session
Signature |
|
|---|---|
Since |
2.0 |
Description |
Enables multiple-session mode to handle more changes than the session buffer allows. Default: disabled. When a command would overflow the modifications buffer, the current secure session is closed and a new one is opened to carry that command. If the split occurs on an SV debit, undebit or reload, the SV Get command it follows MUST be re-issued in the new session, immediately before it, so that the SV command still immediately follows its SV Get and remains the only SV command of the session it is executed in. |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Enable PIN Plain Transmission
Signature |
|
|---|---|
Since |
2.0 |
Description |
Enables the PIN transmission in plain text. |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Enable Ratification Mechanism
Signature |
|
|---|---|
Since |
2.0 |
Description |
Enables the ratification mechanism, which handles an early card removal preventing the terminal from receiving the acknowledgement of the Close Secure Session command. Default: disabled. When enabled, a ratification command is added after the closing command in contactless mode. The card considers the
secure session ratified only once it has processed that command: if the card is removed beforehand, the session
stays unratified in the card, which thus keeps the proof that the terminal may not have been informed of the
outcome. On cards where ratification happens on deselect, no ratification command is required (see
Whether to enable the mechanism depends on which terminal resumes an interrupted transaction:
The mechanism can only be used within the anti-passback delay defined by the transport operator: beyond this delay, an unratified session can no longer be handled as the resumption of an interrupted transaction. |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
See also |
|
Enable SV Load And Debit Log
Signature |
|
|---|---|
Since |
2.0 |
Description |
Enables retrieval of both load and debit log records. Default: disabled. |
Returns |
The current instance ( |
Pre-conditions |
None. |
Errors |
None. |
Init Crypto Context For Next Transaction
Signature |
|
|---|---|
Since |
2.0 |
Description |
Prepares the crypto module for the next transaction by anticipating the security context configuration. This feature is only useful when the currently allocated cryptographic module will be used for the next transaction. It is particularly relevant to optimise the transaction time in a ticketing context of user card validation. For the optimisation to be effective, this operation MUST be called at the very end of the current transaction, that is, after the user has been notified of the access right (e.g. after opening the gate). |
Pre-conditions |
None. |
Errors |
|
Set PIN Modification Ciphering Key
Signature |
|
|---|---|
Since |
2.0 |
Description |
Sets the KIF/KVC of the PIN modification ciphering key. Default: 0/0. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Set PIN Verification Ciphering Key
Signature |
|
|---|---|
Since |
2.0 |
Description |
Sets the KIF/KVC of the PIN verification ciphering key. Default: 0/0. |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
5.3.13. Transaction Manager
Name |
|
|---|---|
Kind |
Interface |
Namespace |
|
Extends |
|
Since |
2.0 |
Purpose |
Common operations for every Calypso card transaction. Prepare/process model. Extending |
TransactionManager defines the full prepare command surface (file selection, reads, writes, counters, PIN, asymmetric key-pair generation).
The preparation step makes it possible to group commands together in order to minimise network data exchanges,
which is especially useful in a distributed architecture.
The bound CalypsoCard is updated after each successful APDU exchange, and parameter ranges are validated as documented in Section 5.3.4.
Processing of prepared commands is inherited from CardTransactionManager (CNA-TR-API) via the
IsoCardTransactionManager supertype.
The Calypso TransactionManager does not redefine processCommands(); it relies on the inherited contract.
Multi-channel operations (processCommandsAndCloseChannel, closeChannel) are reached on demand through asMultichannelCardTransactionManager() of CNA-TR-API when the underlying card supports multi-channel.
Every write operation MAY raise SessionBufferOverflow if the command would overflow the modification buffer and the multiple-session mode is not allowed.
|
Get Exchanged APDUs
Signature |
|
||
|---|---|---|---|
Since |
1.2 |
||
Description |
Returns the APDU commands and responses exchanged with the card and with the crypto module since the beginning of the transaction, in chronological order. Intended for logging and diagnosis; the content is not interpreted by the API.
|
||
Returns |
A |
||
Pre-conditions |
None. |
||
Errors |
None. |
Get Secure Session State
Signature |
|
|---|---|
Since |
3.0 |
Description |
Returns the state of the secure session at the moment of the call. |
Returns |
A |
Pre-conditions |
None. |
Errors |
None. |
Prepare Append Record
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds an Append Record command: a new record is added, and the oldest record is deleted in a cyclic file. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Change PIN
Signature |
|
|---|---|
Since |
1.6 |
Description |
Adds a Change PIN command. It MUST be performed outside a secure session. If transmitted plain, the command
MUST be preceded by a successful Verify PIN. Once processed, the PIN status is available in the
|
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Check PIN Status
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds a Verify PIN command without PIN presentation, in order to read the attempt counter. Once processed, the
PIN status is available in the |
Returns |
The current instance ( |
Pre-conditions |
Capability — the PIN feature is available for this card. |
Errors |
None. |
Prepare Decrease Counter
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds a Decrease command, which subtracts the supplied value from the designated counter of the selected EF.
If several counters of the same file have to be decremented at the same time of the transaction, it is
RECOMMENDED to use Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Decrease Counters
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds a Decrease Multiple command, or multiple Decrease commands. The decision to execute one or the other is made according to the type of card. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Generate Asymmetric Key Pair
Signature |
|
|---|---|
Since |
2.1 |
Description |
Adds a Generate Asymmetric Key Pair command. The public part can be retrieved via |
Returns |
The current instance ( |
Pre-conditions |
State — no secure session is open. |
Errors |
None. |
Prepare Get Data
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds one or more Get Data commands. Security warning: this command MUST NOT be used within a secure session, in both contact and contactless
modes, except with the tag With the tag Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Increase Counter
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds an Increase command. If several counters of the same file have to be incremented at the same time of the
transaction, it is RECOMMENDED to use
Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Increase Counters
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds an Increase Multiple command, or multiple Increase commands. The decision to execute one or the other is made according to the type of card. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Put Data
Signature |
|
|---|---|
Since |
2.1 |
Description |
Adds one or more Put Data commands. The secure session requirement depends on the tag:
The expected data also depends on the tag: the new AID (5 to 16 bytes) for |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Read Binary
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds Read Binary commands. The following For the validity of the offset and the number of bytes to read, two behaviours apply depending on whether the command is placed inside a secure session. Outside a secure session (best-effort mode), it does not fail whatever their validity. Inside a secure session (strict mode), it fails if they are invalid. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Read Counter
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds a Read Records command targeting the supplied counter. The record is read up to the counter location supplied as parameter, so all preceding counters are also read. The following For the existence of the targeted counter, the same distinction applies: outside a secure session
(best-effort mode), the command does not fail; inside a secure session, it fails unless Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Read Record
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds a Read Records command for a single record. Security warning: this command MUST NOT be used within a secure session, in both contact and contactless
modes. For the in-session case, use
Once processed, the data is available in the The following |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Read Records
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds a Read Records command for one or more records. The following For the existence of the targeted record, the same distinction applies: outside a secure session
(best-effort mode), the command does not fail; inside a secure session, it fails unless Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Read Records Partially
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds Read Record Multiple commands. Security warning: this command MUST NOT be used within a secure session, in both contact and contactless modes. The following Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Search Records
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds a Search Record Multiple command. The command searches whether the supplied data are present in the records of the file; an optional mask MAY be applied to specify precisely the bits to take into account in the comparison. It is only possible with a linear, cyclic, Counters or Simulated Counter EF. Security warning: this command MUST NOT be used within a secure session, in both contact and contactless modes. Once processed, the numbers of the matching records are available in the The following |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
See also |
Prepare Select File By Control
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds a Select File command using a navigation control. The following Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Select File By LID
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds a Select File command targeting an EF by LID. Caution: the command fails if the selected file is not an EF. The following Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Set Counter
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds either an Increase or a Decrease command to set the counter to the supplied value. The operation is selected according to whether the difference between the current value and the desired value is negative (Increase) or positive (Decrease). Two assumptions are made, and neither is checked by this operation: the counter value has been read beforehand, and the type of session — and its associated access rights — is consistent with the requested operation (a reload session if the counter is to be incremented, a debit session if it is to be decremented). An inconsistency is only detected when the session is closed. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare SV Read All Logs
Signature |
|
|---|---|
Since |
1.0 |
Description |
Schedules the reading of every Stored Value log, that is, both the load and the debit log records. This
operation requires the selected application to be of type Store Value (file structure The SV transaction logs are contained in two files with fixed identifiers: the file whose SFI is Once processed, the data is available in the |
Returns |
The current instance ( |
Pre-conditions |
Capability — the SV feature is available for this card. |
Errors |
None. |
Prepare Update Binary
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds one or more Update Binary commands. The data of the file before the offset and after the supplied data are left unchanged. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Update Record
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds an Update Record command. Bytes beyond Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Verify PIN
Signature |
|
|---|---|
Since |
1.6 |
Description |
Adds a Verify PIN command. This command MAY be performed both inside and outside a secure session. The PIN
code is transmitted in plain text or enciphered, according to the parameter set in the
Once processed, the PIN status is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
None. |
Prepare Write Binary
Signature |
|
|---|---|
Since |
1.1 |
Description |
Adds one or more Write Binary commands, performing a binary OR with the existing data. The data of the file before the offset and after the supplied data are left unchanged. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
Prepare Write Record
Signature |
|
|---|---|
Since |
1.0 |
Description |
Adds a Write Record command, performing a binary OR with the existing data. Once processed, the data is available in the |
Parameters |
|
Returns |
The current instance ( |
Pre-conditions |
Argument — every parameter is non- |
Errors |
|
5.4. SPI Interfaces
5.4.1. Asymmetric Crypto Card Transaction Manager Factory
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.0 |
Purpose |
Marker provided by crypto extensions to secure Calypso card transactions with asymmetric keys (PKI). Declares no operation. |
5.4.2. CA Certificate
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.1 |
Purpose |
Marker for a CA certificate exposed by a CNA-TCCA-API extension. Registered through |
5.4.3. CA Certificate Parser
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.1 |
Purpose |
Marker for a CA certificate parser exposed by a CNA-TCCA-API extension. Registered through |
5.4.4. Card Certificate
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.1 |
Purpose |
Marker for a card certificate exposed by a CNA-TCCA-API extension. Consumed by the asymmetric crypto extension when authenticating a card; it is not registered directly through |
5.4.5. Card Certificate Parser
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.1 |
Purpose |
Marker for a card certificate parser exposed by a CNA-TCCA-API extension. Registered through |
5.4.6. Card Transaction Crypto Extension
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.0 |
Purpose |
Marker enriching the card transaction command set with specific crypto commands (e.g. signature computation/verification). Declares no operation at the API level. |
5.4.7. PCA Certificate
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.1 |
Purpose |
Marker for a self-signed PCA certificate exposed by a CNA-TCCA-API extension. Registered through |
PcaCertificate, CaCertificate and CardCertificate declare no operation at the API level.
Their concrete content is exposed through the CNA-TCCA-API extension that produced them.
5.4.8. Symmetric Crypto Card Transaction Manager Factory
Name |
|
|---|---|
Kind |
Marker interface (SPI) |
Namespace |
|
Since |
2.0 |
Purpose |
Marker provided by crypto extensions to secure Calypso card transactions with symmetric keys (e.g. SAM). Declares no operation. |
5.5. Enumerations
5.5.1. Calypso Card Product Type
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
1.0 |
Purpose |
Product type of a Calypso card. |
| Value | Since | Description |
|---|---|---|
|
1.0 |
Calypso Prime revision 1.x. |
|
1.0 |
Calypso Prime revision 2.x. |
|
1.0 |
Calypso Prime revision 3.x. |
|
1.0 |
Calypso Light. |
|
1.0 |
Calypso Basic. |
|
1.0 |
Application Type is |
5.5.2. Elementary File Type
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
1.0 |
Purpose |
Type of a Calypso Elementary File. |
| Value | Since | Description |
|---|---|---|
|
1.0 |
Linear EF (1 to several records). |
|
1.0 |
Binary EF (single continuous sequence of data bytes). |
|
1.0 |
Cyclic EF (records organised in a cycle, from the most recent to the oldest). |
|
1.0 |
Counters EF (single record containing K counters of three bytes each). |
|
1.0 |
Simulated counter EF (linear file with a single record, kept for Calypso Rev 2 compatibility). |
5.5.3. Get Data Tag
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
1.0 |
Purpose |
Output data tags retrievable through the Get Data command. MAY NOT be applicable to all products. |
| Value | Since | Description |
|---|---|---|
|
1.0 |
FCP for the current file, as returned by Select File. |
|
1.0 |
FCI for the current DF, as returned by Select Application. |
|
1.1 |
List of EFs in the current DF. |
|
1.1 |
Product traceability information. |
|
2.1 |
Card public key. |
|
2.1 |
Card certificate. |
|
2.1 |
CA certificate. |
5.5.4. Put Data Tag
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
2.1 |
Purpose |
Input data tags injectable through the Put Data command. MAY NOT be applicable to all products. |
| Value | Since | Description |
|---|---|---|
|
2.1 |
Card key pair. |
|
2.1 |
Card certificate. |
|
2.1 |
CA certificate. |
|
2.3 |
New AID of the current application (tag |
|
2.3 |
Link of the current application to a Stored Value application of the same card (tag |
5.5.5. Secure Session State
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
3.0 |
Purpose |
State of the secure session, returned by |
The value reflects the state of the secure session at the moment of the call; a new call to
getSecureSessionState is required to observe later changes. A
secure session is open if and only if the value differs from NO_SESSION.
The values reflect the cryptographic nature of the session and not the application mode
(Regular / Extended).
Both symmetric modes share the same underlying cryptography and only differ in their configuration at the TransactionManager level; the integrator who needs to know the application mode obtains it directly via the sub-type of TransactionManager that has been instantiated.
|
| Value | Since | Description |
|---|---|---|
|
3.0 |
No secure session is open: none has been opened yet, or the last one has been closed or cancelled. |
|
3.0 |
PKI secure session. |
|
3.0 |
Symmetric secure session opened with the personalisation write access level. |
|
3.0 |
Symmetric secure session opened with the load write access level. |
|
3.0 |
Symmetric secure session opened with the debit write access level. |
5.5.6. Select File Control
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
1.0 |
Purpose |
Expected behaviour of the Select File command (cf. ISO/IEC 7816-4 and Calypso specifications). |
| Value | Since | Description |
|---|---|---|
|
1.0 |
The first EF of the current Calypso DF. |
|
1.0 |
The next EF of the current Calypso DF. |
|
1.0 |
The current Calypso DF. |
5.5.7. SV Operation
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
1.0 |
Purpose |
SV operation announced by the SV Get command: reload, or debit/undebit. |
| Value | Since | Description |
|---|---|---|
|
1.0 |
Reload operation: increase the SV balance. |
|
1.0 |
Debit or undebit operation: decrease the SV balance, or cancel a previous debit. |
5.5.8. Write Access Level
Name |
|
|---|---|
Kind |
Enumeration |
Namespace |
|
Since |
1.0 |
Purpose |
Write access level for a Calypso secure session. Each level induces the use of a different session-key role. |
| Value | Since | Description |
|---|---|---|
|
1.0 |
Personalisation, load and debit operations — uses the issuer key. |
|
1.0 |
Load and debit operations — uses the load key. |
|
1.0 |
Debit operations only — uses the debit key. |
5.6. Errors
Every error defined below carries two properties: message (String), which describes the condition, and
cause (Any?), the underlying error that triggered it, null when there is none. They are not
restated for each error.
5.6.1. Card Signature Not Verifiable
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
1.2 |
Purpose |
Indicates that the card has correctly closed the secure session but that the authenticity of the session cannot be verified because the crypto module is no longer available (timeout, network problem, etc.). |
5.6.2. Crypto
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
2.0 |
Purpose |
Indicates that an error occurred when computing a crypto operation. |
5.6.3. Crypto IO
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
2.0 |
Purpose |
Indicates a communication error with the crypto module. |
5.6.4. Inconsistent Data
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
1.2 |
Purpose |
Indicates the detection of inconsistent data. |
The inconsistency falls into one of the following cases:
-
a de-synchronisation of the APDU exchanges, that is, a number of APDU responses different from the number of APDU requests;
-
an inconsistency in the card data, which can happen for example when the data read outside the secure session differs from the data read inside it.
5.6.5. Invalid Card Signature
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
1.2 |
Purpose |
Indicates that the card signature is incorrect. For a transaction secured by symmetric cryptography (e.g. SAM), this indicates that the card has correctly
closed the secure session, but that the card session is not authentic because the MAC it produced is wrong.
This typically happens when the Digest Authenticate or SV Check status word is For a transaction secured by asymmetric cryptography (e.g. PKI), this indicates only that the card signature is incorrect. |
5.6.6. Invalid Certificate
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
2.1 |
Purpose |
Indicates that a certificate failed validation (signature, validity period, issuer or subject details, constraints, extensions, expiration, revocation). |
5.6.7. Invalid PIN
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
2.0 |
Purpose |
Indicates that the provided PIN is invalid. |
5.6.8. Session Buffer Overflow
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
1.2 |
Purpose |
Indicates that the secure session cannot be performed atomically because the modification buffer capacity is insufficient. |
5.6.9. Unauthorized Key
Name |
|
|---|---|
Kind |
Error |
Namespace |
|
Since |
1.0 |
Purpose |
Indicates that the card requires an unauthorised session key. |