Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [keys]

Private and secret keys consists of secret information used as input to various kinds of cryptographic algorithms such as encryption, signature and MAC to select the concrete transformation done by the algorithm.

1
vote
1answer
50 views

Why would we use a Key Agreement Protocol if we already have a key between 2 entities?

For example in my course there is this protocol : Initialisation: A and B are sharing a symmetric key S. (1) A -> B: Ra ; A generates a random number and sends it to A (2) A <- B: Rb ; B does ...
0
votes
4answers
124 views

what is the block in crypto

Sorry for the newbie question, I'm new to cryptography and I have difficulty in understanding what the block is. For example for DES algorithm the block size is 64 bits and the key is equal to 2 to ...
6
votes
1answer
648 views

What are Keyed functions? (Not Hash)

I hope this question is not too obvious, but I came across this paper about PRF, and at some point it writes: "Let $\mathcal{F}:=\{F_s\}_{s∈S}$ be a family of keyed functions, where each function $...
0
votes
2answers
72 views

Shortest key in symmetric algorithm used only once is unsecured?

Considering a message of n bits, one ridiculously short key of 1 bit and using this cryptographic function which performs the <...
0
votes
1answer
241 views

Encryption and decryption using multiple different keys

I want to encrypt files, wich can be decrypted and encrypted by multiple different keys. Is there any algorithm which can accomplish this? Example (Each user has a different key): User 1 encrypts a ...
2
votes
1answer
82 views

Mitigating the damage when a signing key is stolen

Let's say we have a server whose job is to sign documents using a private key. Let's say that there's a bug in the software and the private key gets stolen. I'm interested in mechanisms to mitigate ...
-1
votes
1answer
73 views

Question about key establishment protocol and key exchange attack

If an adversary $M$ observes a session of the protocol between $A$ and $B$ and learns the session key $k_{AB}$.How Can the adversary mount a successful impersonation attack and communicate with $B$ on ...
2
votes
1answer
411 views

Why is RSA considered safe?

Why is RSA safe, using this algorithm to calculate $d$ as the private key? $$e\cdot d \equiv 1 \pmod{\varphi(n)},$$ where $e$ is part of the public key and $n$ is also part of the public key, so there ...
0
votes
1answer
467 views

How to find the decryption algorithm for this encryption scheme?

$\mathrm{KGen}(\kappa)$: Let $(\mathcal G, g, q) \gets \mathrm{GenG}(\kappa)$ be a cyclic group of prime order $q$. Choose random generators $g_0, g_1 \gets_R \mathcal G$, random exponent $x \in_R \...
0
votes
0answers
60 views

Are 80-bit keys considered secure as of late-2017? [duplicate]

I've seen a lot of ciphers with variants that use 80-bit keys, like Grain, Trivium, KLEIN, KATAN & KTANTAN, Piccolo, PRESENT, RC4, Skipjack, and TWINE. Some of these designs are younger than six ...
0
votes
1answer
116 views

Storing private keys directly in a keyring

Storing an RSA 2048-bit key directly in a keyring seems to work fine, and is advantageous because the application can be removed, broken, reinstalled and the key still works. However, most apps seem ...
1
vote
2answers
269 views

Use of symmetric keys rather than asymmetric keys for transport security

Alice has an asymmetric key pair and it also has Bob. They want to encrypt traffic between each other. It would be simple to encrypt the traffic with their public keys, but instead they use key pairs ...
0
votes
0answers
84 views

MTI/A0: modular arithmetic or elliptic curves?

In the Handbook of Applied Cryptography (Menezes, A. J.; van Oorschot, P. C. & Vanstone, S. A.) Protocol MTI/A0 key agreement (algorithm 12.53) described as $\mod p$-protocol. The survey Overview ...
2
votes
1answer
104 views

Risks of full length KCV (components and full keys)?

We have to comply with third-party security requirements for the loading of 3DES keys. I'm a little confused about the reason behind why Key Check Values (KCVs) can't be full length. As KCV are hashes,...
1
vote
0answers
62 views

Question on recovering a key in the algorithm

Let $E$ be a block cipher that has block size and key size both equal to 64 bits. Let $E'$ be a block cipher that has 64-bit block size and is defined as follows: For a 128 bits key $K \mathbin\Vert ...
1
vote
1answer
389 views

What are the inputs of the AES key wrap algorithm?

I have trouble understanding inputs for AES key wrap algorithm as it is explained in section 2.2.1 of RFC3394. Context: I have a data encryption key (DEK) for AES-128 with CTR, which is used to ...
0
votes
1answer
776 views

Questions about future and session key generation in DUKPT process

As I understand this process is done in the client device for generating a unique key per transaction: inject generated IPEK to client device; generate set of future keys (actually 21 future keys) ...
1
vote
2answers
650 views

Why do $p$ and $q$ have to be different in RSA?

When using RSA cryptography, it is possible to have the decrypted message and the initial message the same when $p$ and $q$ are the same. So why are they always different?
0
votes
1answer
233 views

Given an AES-CBC encrypted string, IV, and plain text, how can I compute the key?

If I have the AES-CBC encrypted string along with the IV and the plain text before encryption, how can I compute the key which was used for encryption?
0
votes
1answer
51 views

Creating multiple independent keys for cascading - recommended approach?

I would like to use cascading encryption with 3 algorithms in a similar fashion to Truecrypt, so for example: Encrypted = AES( Twofish( Serpent(Secret, key1), key2), key3) The aim of this is of ...
0
votes
2answers
57 views

SRP with random, but constant private-value b

In RFC5054, the SRP6a algorithm states that the client and the server should generate random ephemeral private values $a$ and $b$ respectively which are used for further derivation in the handshake ...
3
votes
3answers
561 views

Why in one time pad must the key distribution to be truly random

One time pad required a truly random key. Why canwt it be a psudo-random key? For example, if the key distribution is that for each bit the probability to get 1 is 0.6 and the probability to get 0 is ...
1
vote
0answers
176 views

See the RSA's $n = p q, e \text{ and } d$ from ssh-keygen

For learning purposes, how to get the RSA's parameters (I use standard notation): $n = p q $, where $p$ and $q$ are prime and $e$, $d$, such that $ed = 1 \ (mod\ \varphi (n)) $ when doing ...
0
votes
1answer
148 views

When was a RSA Private Key Introduced?

I'm doing some research into the RSA cryptosystem but I just need some clarity on how it worked when it was published in the 70s. Now I know that it works with public keys but did it also work with ...
0
votes
1answer
190 views

Is this is a secure use of AES-CTR?

Here is a hypothetical application of AES-CTR encryption. Encryption: Step 1: Generate random key and IV for new object; Step 2: Use said key and iv to encrypt some data, which is then stored on a ...
1
vote
4answers
203 views

Including the next random One Time Pad as part of the encoded message?

I've tried to do something very simple here, which is to encrypt a message with a one-time-pad (OTP) and include the next OTP as part of that same encrypted message. i.e. The first message consists of ...
2
votes
1answer
147 views

Krack WPA2 decrypt only some small pieces of packets

I have gone through the paper (PDF) available at krackattacks.com. However, from what I understood you force a key reinstallation causing you a nonce reuse over 2 blob of data. As it is a keystream, ...
1
vote
0answers
67 views

What is a simple way to “2 out of 3”-secure a mnemonic phrase without computers? [closed]

I'm working on a safe way to store a mnemonic key. It's 24 words long. Each word is 11 bits of entropy I want to store it in 3 locations One plate should not allow you to unlock the code Two plates ...
0
votes
1answer
216 views

CBC-MAC for Arbitrary Length Messages

Katz/Lindell propose the following modification to the basic CBC-MAC scheme to handle variable length messages (p.125): We sample two uniform independent keys $k_1, k_2\in \{0,1\}^n$. Then to ...
2
votes
0answers
106 views

RSA - find d,e with restrictions

For academic purposes, assuming $n, p, q$ with $n\approx 2^{4096}$ and $p,q\approx 2^{2048}$. I need to find ($e,d$) such that: $e$ is smaller than $2^{64}$ $d\approx 2^{4096}$ and will have as ...
1
vote
0answers
174 views

Cracking a key using a combination of partial keys

As part of a cryptanalytic attack I've carried out, I used a divide-and-conquer strategy to divide the secret key $k$ into several equal-sized partial keys $k = {k_1, k_2, ...}$. The attack works ...
1
vote
1answer
64 views

Does FHE's longer key bring more security than traditional encryption algorithm?

I check some key size which FHE libraries generated, for example, HElib's key size will be more than 300M, while tfhe's is also ...
0
votes
1answer
554 views

Passing data securely through QR codes?

We have to implement a way to securely transfer data from a POS to a mobile app using QR codes. The mobile app gets the payment parameters (amount, description, purchase_id, store_id) to create the ...
1
vote
0answers
68 views

How can I split a packed Ed25519 public signing key into its X and Y coordinates?

I'm using the Curve25519 code (from http://www.dlbeer.co.nz/oss/c25519.html), and trying to convert from a public signing key (Edwards form) to a public key-exchange key (Montgomery form). There's ...
-2
votes
1answer
98 views

Can two different CA's/End Entities in different PKI's have the same asymmetric key pair?

Example: $X$ and $Y$ have the same asymmetric key pair. $X$ communicates with $A$ and gives it's PubKey to $A$. So, $A$ has the PubKey of $X$ which also happens to be the PubKey/PrivKey of $Y$. ...
1
vote
0answers
330 views

WebCrypto: Importing rsa key by crypto.subtle.importKey(…) [closed]

I generated rsa key by jsbn: ...
0
votes
0answers
21 views

Minmum Key Length for Block Ciphers Required keeping in view futuristic quantum computers

In an answer to the Question "What are recommended, general strategies to start block-cipher design and/or analysis?", in terms of brute force attack, it is written 256 bits is considered secure ...
4
votes
1answer
223 views

Katz/Lindell Problem 2.2

2.2 Prove that, by redefining the key space, we may assume that $\text{Enc}$ is deterministic without changing $\text{Pr}[\text{Enc}_k(m)=c]$ for any $m, c$. After banging my head against this ...
7
votes
1answer
155 views

Security consequences of HMAC(m, K) instead of the correct way HMAC(K, m)

I am wondering what is the security loss or consequences of accidentally misusing an HMAC API library in this context: Regular, correct HMAC: ...
2
votes
1answer
1k views

Encrypting Keys in a Firmware-Update

I have a bootloader on a small device (Cortex-M0/M3). I want to publish encrypted firmware updates, that can be installed on the device, using the bootloader. The whole point of the encryption is to ...
1
vote
1answer
215 views

For a typical n-bit symmetric key, how many keys would be considered too weak to use?

I understand that all zeros or all ones would be weak for any cipher. And certain ciphers, e.g. DES, have a list of weak keys. But I assume that there would many 'patterns' that would be detected (if ...
8
votes
1answer
972 views

Relation between Key-exchange and Public-Key encryption schemes

Recently we have seen a lot of papers on Post-quantum key-establishment (key encapsulation mechanism or Key-exchange), largely due to the standardization call of NIST for PQ-protocols. However, most ...
0
votes
2answers
97 views

Keys and mixed encoding - security implications

Let's say we generate a 256-bit key like: secret = base64(csprng(32)). Assume someone using the secret ascii-decodes the base64-encoded string and uses the output ...
1
vote
1answer
761 views

Is this a good way of splitting a private key into a 2 of 3 scheme?

Basically the idea is to split a key into three parts ($key_a, key_b, key_c$) of which any 2 of the 3 parts can be used to recreate the original key $key_a$: a random number smaller then our original ...
0
votes
1answer
64 views

What would be the most efficient way to find two large (2048bit) integers $k$ and $q$ such that $p = kq + 1$ is prime and so is $q$?

What would be the most efficient way to find two large (2048bit) integers $k$ and $q$ such that $p = kq + 1$ is prime and so is $q$? Is there some standard algorithm that I could use?
2
votes
1answer
124 views

Activation keys and asymmetric encryption

To me it seems that a quite safe way of creating activation keys is by using asymmetric encryption, so that the end-user could only reverse-engineer the validation method. This way the company keeps ...
8
votes
5answers
2k views

Why in cryptographic schemes we always assume that the key and plaintext are independent?

Why do we always assume in cryptographic schemes that the key and plaintext are independent? What if the plaintext depends on the key? How can this endanger security? Is this assumption essential for ...
2
votes
1answer
114 views

Would modifying the key of an arbitrary ARX cipher make it harder to break?

Consider a simple ARX block cipher in which after each block is encrypted, the key is rotated and/or XORed by some variable value. Would this make the key any more secure, or just be a waste of time? ...
5
votes
2answers
1k views

Derive a secret from an RSA private key

What I want to do is deterministically derive a secure key from an RSA private key, such that the RSA private key cannot be derived from the secure key. The first approach that came to mind was ...
0
votes
2answers
119 views

Key vs Algorithm when applied to Enigma

I've just been reading the Why should I make my cipher public? question and answers on this site. I understand Kerckhoffs's principle, but I'm unsure exactly how this applies to Enigma - i.e. where ...