Tagged Questions

usually secret information used as input to various kinds of cryptographic algorithms, like encryption, signature, MAC, to select the concrete transformation done by the algorithm.

134 views

HMAC tag to verify the key (verification in the reverse direction)

A quick question. Are there any problems with the following HMAC use-case: We have two entities ($A$ and $B$), both of them have a secret ($A$ has $S_0$ and $B$ has $S_1$) $A$ generates a random ...
2k views

Key Length vs KeySpace

I am a newbie here, this is my first post. I have searched the forum but I haven't found a clear answer to this. In general. What is the relationship between key length and the keyspace? (if there ...
52 views

AES-128/192 safer than AES-256 in practice? [duplicate]

Related-key attacks can break AES-192 and AES-256 with complexities 2^176 and 2^99.5, respectively. Quote from: http://en.wikipedia.org/wiki/Advanced_Encryption_Standard It seems that more bits/key ...
97 views

Anonymisation resilient to key leak

Problem statement Elbonian citizens have been issued a card holding a random $B_j\in\{0,1\}^b$, $0\le j<2^n$, $b\ge n+20$ (representative example $b=64$, $n=28$). The habit has grown to use this ...
319 views

Given infinite unencrypted and encrypted texts, can I find the algorithm?

Given an infinite amount of both unencrypted and the corresponding encrypted text, would I be able to calculate the algorithm? I am relative new to cryptography and don't know if I would be able to ...
91 views

Questions about updating the secret key of RSA?

I want to update the secret key of RSA. I understand there exists a common modular attack on RSA. Precisely, if adversary knows $(e_1, m^{e_1})$ and $(e_2, m^{e_2})$, where $e_1$ and $e_2$ are the ...
3k views

Number of keys when using symmetric and asymmetric encryption?

Quoting part of my homework/assignment: How many keys are required for secure communication among 1000 person if: Symmetric key encryption algorithm is used? Asymmetric key encryption ...
192 views

private keys for multiple devices [closed]

I have an architecture where: a user can have multiple devices (phones) the server needs to broadcast the payload to all devices through the same channel (basically, all devices listen and receive ...
39 views

I am studying for network security exam. And in the slide about Key Management, under a heading Key Verification I see this: Key Verification Almost all cryptographic algorithms have some weak keys ...
186 views

Transforming a key into a seed with the most entropy

I'm making a very simple encrypter in C# which is basically a Stream cipher. The user enters a key(password), converted to a seed for a pseudo-random generator, and the pseudo-random generator ...
111 views

Attacker in a key exchange

I'm having trouble with the following question: $X(A) \rightarrow B:(A,N_X)$ $B \rightarrow X(S):(B,((A,N_X,T_B),K_{BS}),N_B)$ $X(A) \rightarrow B:(((A,N_X,T_B),K_{BS}),(N_B,N_X))$ ...
108 views

What is the functional role of CKY-I and CKY-R in ISAKMP (IKEv1)?

According to RFC 2409: CKY-I and CKY-R are the Initiator's cookie and the Responder's cookie, respectively, from the ISAKMP header. Each CKY is a 64 bit value that is included in each ISAKMP ...
277 views

Block size vs key size confusion

I understand that if a block cipher has $k$-bit keys and $n$-bit input/output blocks, then if $k>n$, we can expect one message-ciphertext pair to narrow us down (I think?) to $2^{k-n}$ possible ...
46 views

DES key complementation property [duplicate]

It is known that DES has the key-complementation property. That is, given any key $k$ and any message $m\in\{0,1\}^{64}$ \operatorname{DES}_k(m)=\overline{\operatorname{DES}_\overline k(\overline m)}...
104 views

Many single-time use keys encryption scheme (not Shamir's Shared Secret)

I'm looking for encryption scheme with the following properties: There's a sequence of keys that can be used to decrypt the message Strictly only one key from the sequence is required to decrypt the ...
1k views

How does GPG verify succesful decryption?

How does GPG (or other programs using the OpenPGP file format) verify that it has succeeded with decryption (for symmetrically encrypted data)? Is something appended to the clear text so there exist ...
68 views

Key escrow on indistinguishability games

Does it mean that when PPT attacker is breaking an indistinguishable based (equivalent with semantic security) game with non negligible probability that he is able to infer the secret keys either on ...
213 views

Equal length of primes in paillier cryptosystem

In the key generation step of paillier cryptosystem , In order to satisfy $\gcd(pq,(p-1)(q-1))=1$ , we can take equal length primes. Instead of taking(length as parameter to generate $p,q$) equal ...
96 views

How to use the key from a Diffie Hellman exchange? [closed]

I watched a YouTube video about Diffie-Hellman called "Diffie-Hellman Key Exchange", and it said after doing some modulo operations with the public modulus and generator and the random private numbers,...
2k views

RSA example-calculation: Public Key = Private Key (e = d)

I am a bit confused. I just calculated manually the single steps of RSA for an implementation with small numbers and suddenly $d$ was equal $e$. Please help me understand what I am doing wrong. Here’...
358 views

What is h in this RSA variant?

I am trying to implement a proposed improved algorithm of RSA . Here the author has increased the number of exponents. However I am unable to understand what $h$ is in the Key generation step. Can ...
970 views

Key management for military GPS receivers

I wonder what encryption scheme is used in high-precision encrypted GPS streams (the so-called “P(Y) code”). If there's a master key needed, then it has to be in every device. Yet the master key doesn'...
521 views

Generation of N bit prime numbers -> what is the actual range?

Short version: When generating a prime number of N bits, should I draw random numbers from the range $[0 , 2^n]$, or $[2^{(n-1)} , 2^n]$? Context: I'm trying to implement a toy-version of RSA as a ...
76 views

exchanging private key between service and iPhone app - digital signing

I need to do digital signing of my request data which will be sent to the server. My server sends distinct private keys to her clients after authentication and expects all responses to be digitally ...
705 views

Strong key generation using PBKDF

I know that PBKDF2 is very useful for generating strong keys. I'm trying to know is there any additional contribution of the given password to produce even stronger keys. Which key is more secure: ...
7k views

How can SSL secure a two-way communication with only one key-pair?

As I understand it, SSL involved the use of a public-private key pair. How does this enable two-way communication? Suppose I have some server with which I wish to communicate securely. I connect to ...
154 views

What is the most secure key expansion routine?

I am looking at G now, but is there a better, (in terms of security and speed), means by which a byte array can be expanded that doesn't involve another cipher, just a simple algorithm? I need to ...
88 views

Is using SHA256 to extract entropy from a p-rand nonce a good way to create keying material?

Using $SHA256(N)$, where $N$ is 64 bytes of output from the Microsoft Windows CryptGenRandom function. Are there any known vulnerabilities with using this method to ...
316 views

Can all asymmetric key pairs be reversed?

After reading about public/private key cryptography, there are still a few points I don't really understand. Based on the way (I understand) challenges work, the public key is used to encrypt a ...
124 views

Counter Mode: how to choose the nonce part of the counter? [duplicate]

Suppose: The "counter field" is about: NONCE || CTR-VALUE. I have multiples messages $M_a, M_b, M_c, \dots$ Each message can be divided into x-bits blocks ($M_{a1}, M_{a2}, M_{a3}, \dots$). Each ...
824 views

Is it secure to derive an AES key from a MAC?

I'm working on a project where we need to encrypt a large number of files and store them on the cloud. And I'm wondering if the following process would be secure (we have a “Hardware Security Module” ...
96 views

Private Key - Memory Lifecycle

I often heard about private key storage, but rarely about key life cycle in memory. For example, when SSL is used from one peer, the private key is used to sign messages or decrypt other peers' ...
2k views

Is Curve25519-java secure?

I have only about 2 weeks of cryptography experience mostly in the form of questions on bitcoin.se. Is Curve25519-java up to date with current Curve25519 standards? Is Curve25519 itself secure? ...
781 views

Is there a symmetric-key cryptography based on key establishment techniques?

Most of the current key exchange techniques are based on public-key cryptography. Are there any key exchange/establishment techniques based on symmetric-key cryptography too? In my setup primary ...
197 views

Session-specific Symmetric Key Derivation Using SHA256

I was wondering if there were any security implications of deriving session keys from a symmetric key using SHA256 in the following manner: $Ks = SHA256(Nonce||K)$, where $Nonce$ is the session ...
402 views

Using multiple secret keys

I have two secret keys. One is a secret key generated by OpenSSL (primary secret key). Second key is generated by performing one way hash operation to GPS co ordinates and time parameters (geo secret ...
221 views

Is encryption mainly using Diffie-Hellman Key Exchange?

I know how Diffie-Hellman Key Exchange works. Is this the main way of encrypting with PGP, ssh, ssl (https), DKIM, ...? I wonder if Diffie-Hellman is the clue to understand how encryption with ...
409 views

Combining two keys

What is the most secure way to combine two "random" keys X of size k (k ≤ 512 bits) and Y of size 512 bits in one key Z of size k? Result Z will be used for encryption/decryption with various ...
690 views

Can we ensure the security of a crypto-algorithm and -implementaton against acoustic cryptanalysis?

Like people always say: “Attacks only get worse…” — which is why I'm asking early. I have been reading the paper “RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis” published December 18, ...
1k views

How exactly does key whitening manage to increase security?

Wikipedia states that key whitening increases security: In cryptography, key whitening is a technique intended to increase the security of an iterated block cipher. It consists of steps that ...
1k views

Can curve25519 keys be used with ed25519 keys?

Can curve25519 keys be used with ed25519? I'd prefer to use ed25519, but there isn't a fast java version. For my application, I'd like to use curve25519 until I can get a faster ed25519 for java. ...
452 views

Public key Issue - same key pair as existing one? [duplicate]

My question is a bit naive, but what if someone generates the same RSA key pair as someone else? This person would have the same private key and so would be able to decrypt messages not intended to ...
183 views

What exactly does a key do?

I am getting to grips with cryptography as a total newbie, and am struggling with encryption "keys" and how to visualize them. From http://computer.howstuffworks.com/encryption.htm/printable: ...
314 views

RFC 5959 specifies the encrypted storage of private keys based on PBKDF2-HMAC-SHA-256 and AES encryption (in ECB mode). Is there a particular reason AES is used, instead of simply XORing the key ...
742 views

Hill cipher key space

Key space is the set of all possible keys that can be used to generate a key. We using the number of valid key to describe it. I've given a hill cipher of block size $k$ over alphabet of size $p$, ...
196 views

User-specified PBKDF2 password, salt, and iterations limits

For a decentralized login where a user is left to select the password, salt, and iterations, what minimums for each should be enforced? In other words, because none are ever stored by the ...
329 views

Generate keys with k3d3 / ed25519-java

I'm trying to use a java implementation of ed25519. In the code, I can't find any functions that generate keys. My experience with cryptography is limited to about three weeks of asking questions on ...
1k views

Does the secret key used in AES have to prime?

I’ve looked around this site and the web quite a bit, but can’t find a definitive answer on whether or not the secret key $k$ used in the AES crypto-system has to be a prime number? Or can you just ...