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

721 questions
Filter by
Sorted by
Tagged with
105 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 ...
174 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$...
579 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 ...
84 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 ...
347 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 ...
113 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 ...
714 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 ...
106 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 ...
152 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 ...
99 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 ...
145 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 ...
177 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 ...
109 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: ...
210 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 ...
5k 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 ...
118 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 ...
149 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 ...
127 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., ...
77 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 ...
275 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 ...
88 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 ...
432 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 ...
119 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 ...
55 views

### Can an encrypted message be derived from only keys?

I recently started teaching myself cryptography, and had an idea while reading up about basic ciphers. Instead of passing ciphertext between Person A and Person B, which can be broken if intercepted ...
1k views

### Can a public key be same as private key?

As I understand, we choose the public and private keys to be mutual inverses. However, it is possible that, in a group, there can be numbers which are their own inverses. E.g. Consider p = 7, q = 3. n ...
177 views

### How does bit-wise operation work for encrypting grayscale images? [closed]

How does bit-wise operation work for encrypting grayscale images? In my Khan Academy course they encrypt an image with bitwise_and, ...
109 views

### Other than an exponent greater than 1, what are the considerations when creating a random 256-bit private key using Diffie Hellman?

Let's assume that I choose the bits for my 256-bit private key exponent by flipping a coin 256 times. Are there any other issues, besides the randomness of the 256-bit private key to consider? For ...
173 views

### Are EdDSA algorithms encoded by ASN.1 DER standards?

Is it required, or widely practiced to encode a EdDSA signature as a ASN.1 Sequence? Why or why not? How should you encode a EdDSA signature? I cannot find mention of DER or ASN in the EdDSA RFC. ...
345 views

### Encrypt UDP packet with time-generated encryption key

I'd like you to help me solve a dilemma of mine. I am currently building a home automation from scratch for my next house. The basic gist of it is that I will send UDP packets over a local network. ...
360 views

### Yarrow and weak cryptographic keys on macOS

Given that macOS uses Yarrow as a PRNG, and Yarrow is only capable of 160 bit outputs (/dev/random on macOS is actually Yarrow) are keys generated on macOS weaker than Linux? Even BSD has switched to ...
88 views

### AES encryption question

If we consider the generation of keys as \begin{aligned} K_0 &= E_K(IV); \\ K_{i+1} &= E_{K_i}(A) \end{aligned} Where A is a block of zeroes, and the ciphertext blocks are computed as ...
104 views

### LoRaWAN 1.0.2 Session Key Security

I am reading about LoRaWAN 1.0.2 specification. For the confidentiality and integrity of the comunication the protocol generate two session keys, the NwkSKey and the AppSKey (part 6.2.5 of the ...
368 views

### Do Carmichael's and Euler's totient functions in RSA generate the same keys?

Starting with the same primes $p$ and $q$ to generate $n=pq$, will Carmichael's totient function and Euler's totient function give the same public key ($e,n$) and private key ($d,n$) in RSA encryption?...
91 views

### Picking 'e' for RSA encryption

What is the reason behind picking either $3$ or $2^{16}+1$ for generating the public key in RSA?
134 views

### Encrypt multiple RSA keys with same passphrase

I have to create and store a bunch of RSA key pairs with openssl. The private keys will be encrypted with the aes256 option and a very long, random password. Would it be safe to use the same password ...
773 views

### AES reverse Rijndael key schedule with decryption round keys

I want to get the original encryption key (32 byte) of AES 256 (CBC) implementation. The implementation has the values of the inversed round keys values hard coded into the decryption function. I ...
494 views

### What are the separate single DES keys from a triple DES key?

Suppose my 192 bit triple DES key (in hex) is 0123456789ABCDEFFEDCBA987654321089ABCDEF01234567 What are the keys for the separate single DES operations? In this ...
3k views

### Why does OpenSSL differentiate between PSS and non-PSS for private key generation?

RSA-PSS private keys The following command will generate an RSA-PSS private key: ...
197 views

### How to prevent Public Key from being replaced entirely?

I am using RSA to sign my license file using Microsoft CNG API. I am signing the license file and sending the file with the <...
72 views

### Acceptable points of failure when applying encryption in an application [closed]

I am working an a Windows application that will encrypt and decrypt files using AES Encryption. The 32 byte key which is diversified and derived using a ATSHA204 unique serial number and some addition ...
154 views

### Purpose of key evolution?

When generating and exchanging keys, what is the purpose of performing key evolution after public key exchange + authenticated encryption?
392 views

### IVs in WEP encryption

First, I'm pretty new to the world of encryption. As I understand it, in WEP, the plaintext and CRC are XOR'd with the IV and the key (or more accurately, the key/stream, which is produced by a pseudo-...
283 views

### How to find at least one private key from a large list of compressed public keys secp256k1

Not long ago I saw a discussion on the Bitcoin Talk forum: https://bitcointalk.org/index.php?topic=5060735.msg50736695#msg50736695 Please give advice and working methods? Is it possible to find at ...
73 views

### Are there a way to progress or age key pairs

I am searching for a way to make the noise X pattern fully forward secret. The X pattern is a way to encrypted and authenticated messages. As a building block to achieve this I started pondering if ...
194 views

### Is it possible to recover the key to a decrypted file? [duplicate]

Is it possible to recover the key to a decrypted file if you have the initialization vector and it uses RijndaelManaged in CBC mode? If so how? The file I want to recover the key from is a xml that ...
551 views

### How to Understand Authenticated Key Exchange?

I am reading some articles about key exchange. I know classic key exchange, such as Diffie-Hellman key exchange. This type of algorithm is vulnerable to man-in-the-middle attack. However, when using a ...
732 views

### Euler's totient function and Carmichael's totient function in RSA [duplicate]

I'm a high school student taking IB and I'm doing my EE on Maths, more specifically on the effectiveness of Euler's totient function and Carmichael's totient function in RSA. Am I right in thinking ...
129 views

### cryptographically signed streaming data

On a high level the question is: how does one cryptographically sign streaming data? Here is the context: a number of people are continuously streaming data to me the data is public and does not ...
I've done some calculations and Diffie-Hellman Algorithm worked for all chosen random numbers except $1$. In the description of the algorithm, I can't find information that the random number has to be ...