# 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.

697 questions
Filter by
Sorted by
Tagged with
38 views

### Perfectly secure cryptosystem as many keys as plaintexts

Is a cryptosystem perfectly secure if there are at least as many keys as there are plaintexts? My guess is yes but I am not sure, new to cyptosystems
71 views

### Storing public key in cookie

I am encrypting my password before sending to my server with a public that i have stored as a cookie. Is there any security risks storing my public key in the cookie? Are there any better ...
31 views

### Prove that for key with $n$ dimensions, the order of the key is $k!$

I need to prove, that for a key with $n$ dimensions, they order of the key would be $n!$ and to prove that, I need to use mathematical induction: \text{Let n = 1} \Rightarrow {1} \text{ if there ...
52 views

### Trying to understand how the same secret key end up being calculated between Alice and Bob

This is basically a duplicate of this question which was not answered very clearly. From the documentation, these are the calculations that happen for Alice to compute the shared secret key: ...
33 views

### PCI - Limit Key Injection Capabiltiy 3DES + DUKPT

Current Context: I'm using a Triple DES with a DUKPT Key Management Approach. I have two organization which have access to the BDK Key: Orgzanization 1 which acts as the Secure Decryption ...
412 views

### Key Exchange vs Key Encapsulation

From what I understand, the steps of a key exchange protocol are Alice and Bob each encrypt something using their public key and private key and send the result to each other Alice and Bob each do ...
51 views

### BIP32 Extended Key to EC Private and Public Key Pair

We are working on an application in Android using Java. In our project, we used to generate EC key pairs (of size 384 bits) using SpongyCastle - an old Android version of Bouncy Castle. The problem ...
156 views

### Computing PGP ed25519 and curve25519 keygrips?

There are public key algorithmic differences for how PGP computes fingerprints and keygrips. For the v4 protocol, fingerprints are not exclusively computed from public keys while keygrips are. RFC ...
41 views

### AES key with DES3_CBC_PAD mechainsm

I am new to cryptography and have a question. If I try to wrap some key using an AES key using DES3_CBC_PAD as a wrapping mechanism will this go to work? I am doing this operation inside an HSM.
94 views

### RSA p and q size to encipher a block

I have a plaintext about 18 bit size. I have to encipher it using RSA. How large have to be p and q? So M (message to encipher) = 2**18 bit I tried, using a Python coded RSA alghoritm, different sizes ...
3k views

### Why is the Keyspace of a Substitution Cipher not 2^26 but 2^88

It is known that a cipher has a keyspace of cryptographic algorithm whose key length is $n$ is given by $2^n$, but the keyspace of the substitution cipher is $2^{88}$ which is an approximation of $26!$...
115 views

### Key space math clarification

The following table specifies a cryptosystem based around a very simple encryption algorithm with four different plaintexts A, B,...
46 views

### Given algorithms A and B with 128bit & 256bit variants, is A128 AND B128 keys better, equal, or less strength than either A256, or B256?

I'm not comparing an algorithm specifically because I'm interested in the generic aspect of key lengths. If I'm wrong to do that then I could bring up particular sponge functions to use. The idea is ...
71 views

### RSA: least significant bit position in key

How can I show that $C' = 2^eĀ·C^* \bmod N$ when it is decrypted will add zero bits in the least significant bit position of the key? I am not sure if the cause is multiplying by a ciphertext which ...
79 views

### Is Googles Envelope Encryption the same as Hybrid Encryption?

Google is advertising the use of Envelope Encryption in their products with their KMS. By the description, it sounds very much like Hybrid Encryption. But since I could not find any reference to ...
34 views

### If they exist a relation between decisional Diffie-Hellman assumption and composite decisional residuosity assumption

From the cryptographic hardness assumptions, we have DDH and CDR assumptions. It is known that the composite decisional residuosity assumption is related to a factoring problem, while the DDH is ...
135 views

### How HSM stores keys securely

when we say that HSM stores keys securely we mean that non-authoriszed requester cannot access the keys. but the key is stored physically anyway in the hardware, so access is still possible if the ...
83 views

### Generating Private Keys [closed]

First of all I want to say that I have exactly 0 knowledge how I can write something in Python. But I have some knowledge in math especially finite fields. That's why I want to learn more in writing ...
62 views

### Any known cases of lucky collisions resulting in security breaches?

This isn't a deep technical question, but I feel like this is a good place to ask. Modern cryptography generally rely on statistical chances of collisions according to current computing powers. Are ...
878 views

### Does encrypting the key with itself make it easier to crack the ciphertext? [duplicate]

As the title states; Is there any risk from encrypting the key with itself? EG. $C = AES(K=K, M=K)$ I'd assume not; after all, how does having the key for a safe inside the safe make it easier to ...
89 views

### Encrypt data. Create 5 keys. Just 3 keys are needed for decryption

I would like to encrypt some data and create 5 keys. These keys are stored in different places. If I want to decrypt the data I just need 3 of these 5 keys. Is there a way to do this?
101 views

### Would XOR'ing two Argon2 keys add extra security?

When a user registers on the app, they need to provide a password they create and we provide them with a randomly generated passphrase (e.g. Apple Cat Ladder Fire). We then use Libsodium's ...
86 views

### Difference between Key Scheduling and Key Generation?

I am a little bit confused in the terms i.e Key Scheduling and Key Generation. What is the actual difference between these two terms? According to Wikipedia, the terms are described as: Key ...
106 views

### Two possible plaintext's using OTP decryption

I am using this cipher-text c = 04 10 12 00 01 08 67 0A 19 65 0F 03 0A 00 with two possible keys ...
190 views

### Entropy preservation through cryptographic hash function

Background First, while studying MinEntropy a bit, I came across an NIST paper, "DRAFT SP 800-90B (second draft)," which suggests "twice" the entropy of the underlying block of a cryptographic hash ...
86 views

### RSA - Calculating $d$ given $\varphi (N)$ and $N$

From this discussion, I know that if I know $\varphi (N)$ and $N$ (where $N=pq$, $p$ and $q$ prime), then I can very easily get $p$ and $q$. Suppose I have the encrypted message $c$. I want to get ...
144 views

### How does this formula work $(aG + bG) = (a + b) G$ in ECDSA?

Please explain how does this formula $(aG + bG) = (a + b) G$ work in ECDSA? According to the source: $a$ and $b$ are different private keys Suppose $a = 3$ $b = 4$ then the public key is $Q = aG$...
464 views

### Determine the RSA private key from public key

I was told that you can determine the private key of an RSA encryption with the public key. I thought the point of a public key was to avoid letting people find the private key, but anyway, they said ...
63 views

### Is it possible to narrow down the possible keys used for AES CBC encryption, knowing a given plaintext and its ciphertext, where IV=0? [duplicate]

I'm brute forcing a ciphertext with a given dictionary to figure out which key was used. However, it's been hinted at that there is a way to narrow down the dictionary to a smaller subset of ...
342 views

### Are there any known problems or attacks for using SHA1(AES_key) as the HMAC key?

See this answer that explains the following sequence of operations: CipherText = IV|| AES(key1,iv,message) tag = hmac(key2,ciphertext) That answer says, You ...
105 views

### Is there a key exchange protocol that requires only one message?

Say I want to exchange a secret with someone, but I only get to send one message to the other person, and then we encrypt with that secret. Diffie-Hellman and ECDH require multiple messages to be sent ...
701 views

### Is it possible to identify a Serpent encryption key in memory?

It has been shown that AES keys that are in use can be identified in memory. This identification relies on discovering expected round keys in memory that are contained within the key schedule. My ...
91 views

### Extracting RC4 and 3DES keys from system memory

I have read papers [1], [2] that have presented techniques on extracting symmetric encryption keys from memory during the process of encryption. There are tools [3] that can extract AES keys from ...
142 views

### Expanding Key Material

Is there a way to take key material (for example 256 random bits for an AES key) and "expand" it over to a larger amount of data? Or can I go the opposite way and take a large amount of random data ...
90 views

### Which HMAC scheme more secure?

Which HMAC scheme is more secure? Or are they of the same level of security? Scheme One Compute a HMAC on the data to encrypt (cleartext/plaintext) Encrypt the data with AES_CTR_256, and append ...
122 views

### Is using the same MAC twice insecure?

I was thinking last night about whether or not a HMAC-Encrypt-HMAC would be secure if you used the same HMAC key. Here is the full recipe: Compute a HMAC on the data to encrypt, and append it to the ...
124 views

### How does tls 1.3 cope with man in the middle (in key exchange)

in case i cannot do PSK (give the same key to both sides via physical means). i saw tls1.3 still support DH (doesnt matter that it is DHE or ECDH). isnt that makes it a weak key exchange? do they ...
105 views

### AES-128 with doubled 8Byte key

Assuming I encrypt data with AES-128 and a random 8-byte key x in the following way: ...
177 views

### Related-key attacks against Salsa20 and ChaCha

From the Salsa20 security document, DJB states that he doesn't care about related key attacks: The standard solutions to all the standard cryptographic problemsāencryption, authentication, etc.āare ...
4k views

### What is the practical impact of using System.Random which is not cryptographically random?

I recently noticed a .NET software using PBKDF to derive an encryption key from a password string. This password string was ...
89 views

### Is a symmetric encryption key derivable using the input and the output?

I am looking for a python library for encrypting a string with a single key. I do not want the key to derivable by knowing the input and the output. I have came to ...
129 views

### Are any block ciphers provably free of equivalent keys?

There are $2^n!$ possible permutations of an $n$-bit block cipher $E_k:\{0,1\}^n \rightarrow \{0,1\}^n$, and any given key $k$ selects one of these permutations at random. Define equivalent keys as a ...
104 views

### What is a randomly derived key?

It is a well-known fact that using the same key + nonce combination with a stream cipher twice breaks security. The NaCl library has different primitives for authenticated encryption (i.e., ...
70 views

### Do people sign my subkey?

So, I've generated my GPG key pair. Created a subkey for signing and a subkey for encryption. Exported the whole thing, removed my master key pair to a secure place, re-imported only the subkeys. Now, ...
94 views

### Confusing terminology about stream ciphers

In their book, Understanding Cryptography, on page 37, Christof Paar and Jan Pelzel write: Definition 2.2.2 One-Time Pad (OTP) A stream cipher for which the key stream s0,s1,s2,... is ...
227 views

### AES256 key entropy requirements

Is this encryption method sensitive to weak keys? Is there any reference in the NIST on the AES key's entropy? (For example, must it have been generated from a TRNG?) Can I safely use the Microsoft ...
87 views

### Why is it not possible to tap into the HTTPS traffic specifically going from the server to the client?

How I think HTTPS works when sending data from server to client: -Server has 1 public, 1 private key. -Client has access to the server's public key and not it's private key. -Client has no keys of ...
357 views

### AES with bigger keys more secure?

Say you were to generate a 512 bit AES key, then encrypted a message by running it through AES CTR 256 twice, with the first and last parts of the key respectively. Would it be as secure as ...
102 views

### Why there isn't a consistent key transform function of HMAC?

I am currently learning, the internal working of HMAC. There exists a key transformation process in the beginning, which works as follows:- Make the length of $K$ (Key) equal to $B$ (number of bits ...