SecCube Security
Protection modes
A SecCube is protected in different ways:
- its metadata (i.e INIT and MAP records) are always MACed.
This guarantees
the authenticity of those records. For instance, it prevents an
attacker from
modifying SecCube's configuration (in the INIT record).
- end-user records (aka 'payload') are optionally secured. They may
be
hashed, MACed (= a kind of signature), timestamped and / or encrypted.
In all cases, the protection mode applies to the entire record, i.e the
payload,
its length and its label (see datarecordheader_t structure). If
timestamping
is set, the record is timestamped at the time it is put in the SecCube.
Note SecCubes protect records (INIT, MAP or DATA), but not
individual blocks.
The reasons are twofold: 1/ we are interested by confidentiality /
authenticity of end-user's
payload (i.e. the DATA record) not in a finer granularity, and 2/
protecting each blocks would
reserve more physical space in the SecCube.
End-user record protection modes may be combined (e.g. timestamped and
signed). On a security point of view, combining hashes and MACs boil
down to the same
as only MACs because MACs provide integrity + authenticity, whereas
hashes provide
only integrity. However, we do not restrict such combinations.
Several protectiion mode combinations are possible. They are always
processed
in the same order:
- timestamp the record, append the time stamp to the record.
- hash the record (including timestamp), append it.
- MAC the record (including timestamp and hash), append it
- encrypt the record (including timestamp, hash and MAC)
SecCube keys
A SecCube uses four different keys:
- a record encryption key. This key is used to encrypt
DATA records. It is optional (depends on protection mode
selection). It is stored in the INIT record, encrypted by a public key.
- a MAC key. This key is stored in the INIT record, encrypted by a
public key. It is used to MAC SecCube's INIT and MAP records.
Additionally, if the SecCube is configured for DATA record
authenticity, this key MACs
DATA records.
- a public key. This public key is used to wrap the record
encryption key or the MAC key.
It is stored in the INIT record, in OpenPGP's armoured public key
format.
- a private key. This key is used to unwrap record encryption key
and MAC key. It is
never stored in the SecCube, and must be provided by the caller.