# All Questions

19,854 questions
Filter by
Sorted by
Tagged with
17 views

### Key derivation for AES-GCM using HKDF?

I have a system comprising N >1000 nodes. At each node I would like to use HKDF to derive a unique 256-bit key, Kn (for the nth node), from a pre-shared master key, K0, and a locally-generated random ...
9 views

### Is F_k_1(x) \xor F_k_2(x) a pseudorandom function?

I'm trying to determine if $F_{k_1, k_2}(x) = F_{k_1}(x) \oplus F_{k_2}(x)$ ($k_1 \neq k_2$ because that would be lame) is a pseudorandom function. My hunch is that it is. My reduction proof proceeds ...
6 views

### Optimising shor's algorithm

So I've run into this challenge where I was given the guess $g$, and the power $p$ of Shor's algorithm. All I have to do now is $g^{p/2} - 1$ and then GCD the result with n. But the problem is ...
55 views

### What's the likelihood of a collision if I use a hash to detect data change?

I have a set of data that I want to sync, and instead of sending an entire set of data, I wanted to use a hash. It is basically a list of GUIDs with either "true" or "false". ...
3k views

### Ed25519 is a signature or just elliptic curve

Ed25519 is a signature or just elliptic curve? EDDSA is signature, what using curve ed25519?
2k views

### Difference left-or-right CPA security, IND-CPA security

I am trying to understand the notion of left-or-right-CPA (LOR-CPA) security for private-key encryption schemes introduced in my lecture. If I understood it correctly so far, the only difference to ...
34 views

### Building Key Streams from PRNGs

I am reading an intro book about cryptography and the author tries to explain why using pseudo random number generators is vulnerable. Given PRNG equation; \begin{align} S_0 &= \text{seed}\\ S_{...
21 views

### How does gpg know what cipher algorithm is needed for decryption?

I am using gpg to make encrypt a tar.gz. My first try uses --verbose --symmetric and then the decryption is done with ...
20 views

### Encrypt letters to numbers using ASCII value. Using Mod 23 not 26!

Design a program that can convert a given string to an encrypted form as well as an encrypted sequence to a string using char* Convert letters to numbers. The letter is encrypted through it's ASCII ...
14 views

### Decrypting a TripleDES with encoding/Ciphers

I would appreciate some help, I've been given a set of encryption Keys, vectors. My coworkers and I are tasked with decrypting the string in order to produce specialized requests to an outside service....
21 views

### Is CECPQ2 forward secure?

Is the CECPQ2 key exchange, as deployed by Google[1] and Cloudflare[2] in TLS 1.3 forward secure against quantum computers? I know that it is using HRSS+SKY as the post-quantum part of the key ...
5k views

### How do we know a cryptographic primitive won't fail suddenly?

It took more than a decade from when MD5 looked like it was going to break to the point when it was actually broken. That's more than a decade of warning. How can we be sure that when our ...
136 views

### CVP over $\Bbb Z_{q}$ - is the problem still hard?

I'm reading about the CVP problem, and all the papers I've read so far handle the case where the CVP matrix and vector are over $\Bbb R^{n}$ (or over $\Bbb Z^{n}$), and the distance is a real number. ...
19 views

### Most efficient way to crack a monoalphabetic substitution cipher with spacing intact

I've got a cipher I've been challenged to crack by hand. It's a monoalphabetic substitution cipher, and the English spacing is intact, so all of the words are the right size. Is there a more ...
48 views

### How can we reduce indistinguishability-from-random to other security notions?

In probabilistic encryption schemes, different notions of security exists. I'm interested in the relationship between two notions. One is the indistinguishability-from-random notion of security and ...
23 views

### XCBC Authentication

So XCBC was made to counteract lengths attacks against CBC-MAC, but how exactly does the modification made defeat this attack? All I can find are a few papers on why 2-key XCBC isn't actually secure.
11 views

### Why does mbedtls_rsa_rsaes_pkcs1_v15_encrypt() to make wrong encryption? [migrated]

I use mbedtls library for my small crypto application. mbedtls API has this function: ...
21 views

### Are biases narrowed towards the provenance of hard NP complete problems relevant?

I hear of randomized reduction, deterministic reduction and non-deterministic reduction of complexity from A to B problems. This could make things impossible for polynomial time adversary prying into ...
8 views

### Building Key Streams from PRNGs [duplicate]

I am reading an intro book about cryptography and the author tries to explain why using pseudo random number generators is vulnerable. Given PRNG equation; ...
17 views

If an attacker had a padded message and its corresponding CBC-MAC tag, how would they construct another message which produces the same tag for the same key as the original? The padding scheme used in ...
12 views

### Is it possible to sign a message with a base58 secret key with Tweetnacl library? [migrated]

I've generated a key pair using Tweetnacl.js: ...
3k views

### Is there a difference between PRF and a hash function?

Is there a difference between PRF and a hash function? For example: Creation of a secret key is using PRF and creating a secret key is using hash function.
33 views

### Block cipher linearity (in relation to hill ciphers)

So while I knew hill ciphers were a form of block cipher (I'm assuming all the ones I have solved to date were ECB or something similar), so that got me thinking. Is it possible to use hill ciphers in ...
3k views

### Is it possible to find the key for AES ECB if I have a list of plaintext and corresponding ciphertext?

Assume I have a list of plaintext text and its corresponding ciphertext which was created using a specific key with AES in ECB mode. Can I recover that key? If, how big does the list of plaintext ...
142 views

### Missing public exponent

Using LUC RSA, I have a list of 8 public keys $(R_1,n_1)$ through $(R_8,n_8)$, and a list of $8$ messages $M_1\dots M_8$. The messages have all been double encrypted. However, one of the public key ...
45 views

### How to implement GSW13 using Helib or SEAL?

I want to implement the homomorphic encryption scheme proposed in GSW13, and make some changes to it, but seems that there is no library that has already been implemented it. Since this is a ...
47 views

### Find salt that produces hash(knownInput , salt) = knownOutput

Hope anyone can help! As title says, I need to find a unique salt that produces knownOutput, using knownInput, when calculated like this: ...
74 views

### Why is “key-rotation” called key-rotation?

The word "rotate" in respect to "key-rotation" has connotations of looping/repeating variable values like a rotor, but as far as I can tell there isn't a single definition available for "key-rotation" ...
23 views

### How Can I implement this hash function in python/Sagemath [on hold]

I don't know how Can I implement hash function H(1, v, c). I know values v, c. Cryptosystem: Classic Mceliece First screenshot https://arxiv.org/pdf/1907.12754.pdf Second screenshot https://classic....
131 views

### How is PBKDF2 so much better than normal Hashing or even using HMAC

I do not know how the Key Length extension attack works. So if we leave that aside for once, and say just about usual brute-force attack on the hash, I don't really know how is PBKDF2 so much better ...
220 views

### Why are password database breaches bad if cryptographic hashes can't be reversed? [closed]

If companies such as Facebook store our passwords as hashes, when they are leaked how can this be a threat to the users? I thought of it because nowadays we do not have computational power to break ...
16 views

### Do I need to use a matrix of size N x n for the public key in the BGV scheme when using Ring-LWE?

I'm going through the BGV paper and trying to make a toy implementation, but I just want to focus on Ring-LWE. In the paper, they set $N = \lceil{(2n + 1)\log_2(q)\rceil}$, and generate $A'$ uniformly ...
29 views

### Proving a function is or is not a pseudorandom function F_k(x) = F_k(x)||0

I have 4 functions to analyze. I need to determine if they are or are not pseudorandom and give a proof/counterexample. I'm having trouble just determining if they are - let alone proving or giving ...
80 views

### Post-Quantum security of Pseudo-Random Functions

I am wondering what is the exact post-quantum security of a PRF. I know that for most symmetric mechanisms, it is assumed it is sufficient to double the key size, but I am looking for a more precise ...
21 views

### Constant number of rounds in Yao's Protocol for semi honest adversaries

According to me, every OT takes a constant number of rounds and since we have to do an OT for every input of one party, we'll have to do O(n) OTs which would correspond to O(n) rounds. But I have read ...
108 views

I'm trying to wrap my head around how different padding methods affect the strength of CBC-MAC's. Suppose a message is split into different blocks, m1, m2, m3 etc. and the last block is padded with 0'...
682 views

### What is the difference between PRF and a Random Oracle?

What is the difference between Pseudo Random Functions and Random Oracles? Is the difference only about the domain of PRFs and Random Oracles, former having a fixed domain and latter can act on any ...
36 views

### An assignment topic in cryptography [on hold]

I'm currently taking a course in cryptography. I'm supposed to make reference to a research paper related to cryptography and prepare a document as part of my course assignment. I request someone to ...
56 views

### what are the benefits/limits of constructing AEAD using Duplex mode with ARX primitive (chacha20 for example)?

I understand that WAGE cipher uses duplex/sponge mode with stream based cipher for Authenticated encryption with associated data (AEAD) and NORX uses duplex/sponge mode with LRX structure , so , Is ...
564 views

### Are there any differences between PIR, oblivious transfer and differential privacy?

I am trying to make a taxonomy of the different purposes of some cryptographic protocols. Generally speaking, the purpose of PIR, oblivious transfer and differential privacy--it sounds as if they were ...
854 views

### What is a related key?

We talk of related keys and related key attacks, but what is a 'related key'? So in three related parts:- How can one key be related to another key? Is there a metric describing the degree of ...
276 views

### DIY over-encryption with a related key

I know next to nothing about cryptography, which is bad because I'm a programmer. I was exploring some code the other day and the encryption part of it seemed a little strange to me. I'd like the name/...
40 views

### Differential privacy on medical data

When we apply the differential privacy on medical data to protect the personal data of the patients, how the doctors can access the original data to analyze them and to intervene in real-time. In ...
788 views

### What telltale signs would indicate that quantum computers are about to become dangerous to classical cryptography?

What would be telltale signs that quantum computers become imminent and sizable danger to classical cryptography in commercial applications ? Make classical cryptography consist of symmetric ...
23 views

### Maintaining validity of ZKP throughout re-randomization of homomorphic ciphertext without linkability to previous ciphertext

Question: How is it possible to adapt a ZKP for a homomorphic ciphertext to still be valid after said ciphertext has been re-randomized? Context: In a lot of e-voting systems homomorphic encryption ...
95 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 ...
4k views

### How does IBM's 53-bit quantum computer compare to classical ones for cryptanalytic tasks?

IBM just announced "a new 53-qubit quantum computer". How does it compare to classical computers, performance-wise, for cryptanalytic tasks? E.g. finding a 48- or 64-bit value whose SHA-256 has a ...
301 views

### What does modular inversion mean?

I'm trying to implement an e-voting algorithm, which is described at the paper "Internet Voting Protocol Based on Improved Implicit Security" by Abhishek Parakh & Subhash Kak. At the Example 1 ...