A second cryptographic device for performing a lattice-based key exchange or a lattice-based key encapsulation key agreement protocol with a first cryptographic device, the second cryptographic device comprising - a communication interface configured to communicate with the first cryptographic device using the lattice-based KEX or a lattice-based KEM key agreement protocol, - a processor configured to - compute a final seed from - a pre-seed received from the first cryptographic device, and - a pre-shared secret, said secret being pre-shared between the second cryptographic device and the first cryptographic device, - compute a common object (a) from the final seed using a deterministic random bit generator (DRBG) or a pseudorandom number generator (PRNG), - obtain a first public-key (b) associated with the first cryptographic device, and obtain a second private-key (s) associated with the second cryptographic device, the first public key being computed at the first cryptographic device, said computation comprising a multiplication between the common object and a first private key of the first cryptographic device, - compute a second public-key (u) from the second private-key (s), computing the second public-key (u) comprising multiplying the second private-key (s) with the common object (a), - compute a second raw shared key (k ∗) from the first public-key (b) and the second private-key (s), computing the second raw shared key comprising a multiplication between the second private-key (s) and the first public-key (b), - transfer the second public-key (u) to the first device; wherein the final seed is computed from - a network address of the first and/or second cryptographic device, - a purpose of the network connection, - a time of day, and/or - a interaction counter, the interaction counter being maintained by the second cryptographic device and the first cryptographic device and is increased at least whenever a shared key is derived. - a communication interface configured to communicate with the first cryptographic device using the lattice-based KEX or a lattice-based KEM key agreement protocol, - a processor configured to - compute a final seed from - a pre-seed received from the first cryptographic device, and - a pre-shared secret, said secret being pre-shared between the second cryptographic device and the first cryptographic device, - compute a common object (a) from the final seed using a deterministic random bit generator (DRBG) or a pseudorandom number generator (PRNG), - obtain a first public-key (b) associated with the first cryptographic device, and obtain a second private-key (s) associated with the second cryptographic device, the first public key being computed at the first cryptographic device, said computation comprising a multiplication between the common object and a first private key of the first cryptographic device, - compute a second public-key (u) from the second private-key (s), computing the second public-key (u) comprising multiplying the second private-key (s) with the common object (a), - compute a second raw shared key (k ∗) from the first public-key (b) and the second private-key (s), computing the second raw shared key comprising a multiplication between the second private-key (s) and the first public-key (b), - transfer the second public-key (u) to the first device; wherein the final seed is computed from - compute a final seed from - a pre-seed received from the first cryptographic device, and - a pre-shared secret, said secret being pre-shared between the second cryptographic device and the first cryptographic device, - a pre-seed received from the first cryptographic device, and - a pre-shared secret, said secret being pre-shared between the second cryptographic device and the first cryptographic device, - compute a common object (a) from the final seed using a deterministic random bit generator (DRBG) or a pseudorandom number generator (PRNG), - obtain a first public-key (b) associated with the first cryptographic device, and obtain a second private-key (s) associated with the second cryptographic device, the first public key being computed at the first cryptographic device, said computation comprising a multiplication between the common object and a first private key of the first cryptographic device, - compute a second public-key (u) from the second private-key (s), computing the second public-key (u) comprising multiplying the second private-key (s) with the common object (a), - compute a second raw shared key (k ∗) from the first public-key (b) and the second private-key (s), computing the second raw shared key comprising a multiplication between the second private-key (s) and the first public-key (b), - transfer the second public-key (u) to the first device; - a network address of the first and/or second cryptographic device, - a purpose of the network connection, - a time of day, and/or - a interaction counter, the interaction counter being maintained by the second cryptographic device and the first cryptographic device and is increased at least whenever a shared key is derived.