Class desfire::crypto_des_base

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class crypto_des_base : public desfire::crypto

Base class for a DES cryptographic implementation. Inherit from this.

Compared to crypto, this class fixes the cipher_type and provides the implementation of the session key derivation function init_session (which then calls setup_with_key). Subclasses should then implement only setup_with_key and do_crypto.

Subclassed by desfire::esp32::crypto_des

Public Functions

inline virtual desfire::cipher_type cipher_type() const final
Returns:

desfire::cipher_type::des

virtual void init_session(range<std::uint8_t const*> random_data) final

Implementation of DES session key derivation; will internally call setup_with_key.