# All Questions

64 views

### Cryptographic hash with ability to ignore specific bits based on a hidden pattern?

I'm looking to use password-style hashing to validate an environment, where some parts may be irrelevant. For example: ...
44 views

### May I use Random Oracle for Inversed Look-up?

Consider there is a protocol in real world calling a random oracle $\mathcal{H}$ for a priavte input $k$. Then in the ideal world, after the calling of $r \leftarrow \mathcal{H}(k)$ by a honest party, ...
113 views

### Muchomor cipher

I've been given a task to research and possibly implement so called 'Muchomor' cipher. Has anybody ever heard of this cipher? I've found only one article about it and it was in Russian. I'm quite ...
67 views

### What is the difference between LCG and Affine cipher?

What is the difference between LCG and Affine cipher? More specific: What are they used for, and what are the structural differences between them?
98 views

### RSA: must $d$ be an integer?

I am only taking baby steps in RSA. If $p=11$, $q=7$ and $e=3$, $$\phi(n) = 10*6 = 60$$ Then: $$d = (2 (\phi(n)) + 1 ) / 3 = 121/3$$ Should $d$ be kept as a non-integer or is such a $d$ invalid? ...
475 views

### bank websites using AES_256_CBC vs AES_128_GCM/CBC [duplicate]

Hello i have just recently started learning about cryptography, so i was doing some little research on what kind of encryption techniques and modes that were used in bank web pages. I have noticed ...
124 views

### (Lightweight) Multicast one-way Authentication

Problem: I'm thinking about a lightweight solution to provide source authentication (only one source) to multiple receivers (multicast message). Context: Taking the problem to ground, we can think ...
50 views

### Reusing same source for single-source randomness extractor

Let $ext$ be a single-source randomness extractor which takes a $d$-bit seed and a $n$-bit source as input and produces a $m$-bit output. Suppose we have a source $X$ with min-entropy $k$. Is it ...
77 views

### Which hash function is usually used in RSA?

I know there are several available, however I can't seem to find whether there is one standard one or not. I think I understand the process of digital signatures, just wondering which has function is ...
62 views

### Rogue CA Certificate MD5 Collision Control

Papers from Marc Stevens et al show that X509 certificates that rely on MD5 signatures can break the assumed security model, that is, it allows for a forged certificate to have the same signature as a ...
85 views

### Problem reproducing AES results

First of all, I just implemented AES because I wanted to understand how it works and as a challenge to see if I could do it and I won't use to encrypt anything important, ever. The (German) Wikipedia ...
101 views

### Using HMAC as a nonce with AES-CTR encrypt-and-MAC

Suppose I use the following encrypt-and-MAC construction: $E(k_1, k_2, n, m) = E_\text{AES256-CTR}(k_1, n, m) \| \text{HMAC-SHA256}(k_2, m)$, where: $k_1$ and $k_2$ are 256-bit keys $n$ ...
86 views

### How can there be AES-256-GCM, when GCM is defined for 128-sized blocks?

In both node.js and OpenSSL, I am seeing cipher "aes-256-gcm". However, in NIST Special Publication 800-38D, that defines GCM, I am reading: The underlying block cipher shall be approved, the ...
41 views

### Unbreakable encryption [duplicate]

I am a newbie, I know that I must be wrong, but I need a good explanation. How is it possible to break a cryptographic algorithm created by me, when only I know the algorithm and the key for ...
64 views

### Multi-Party Encryption for a Shared Document

Is there an encryption algorithm/protocol where any of a pre-defined set of keys/passwords will succeed in decrypting a document? The number of keys can be fixed, say, 10 or 20 possible passwords. ...
37 views

### StoredKey in Salted Challenge Response Mechanism (SCRAM)

In SCRAM (RFC5802, page 8) the client generates ClientKey to server, which is a derivation of the original password. This is communicated to the server in a secure ...
154 views

### What are the steps to decrypt a TLS 1.1 record?

My question is related to another question in Cryptography about TLS 1.1 and 1.2. I have read both RFC 2246 The TLS Protocol Version 1.0 and RFC 4346 The TLS Protocol Version 1.1. What I know is that ...
54 views

### User revocation in Identity Based Encryption

I read several papers about user revocation in IBE recently. A common point is that when a user is revoked, some other valid users should also update their private keys. Does this mean that one ...
32 views

### Edwards / Montgomery ECC over binary extension fields

I recentely had a discussion about the redesign of our ECC code for the library I'm collaborating on and the person I was discussing with came up with Edwards and Montgomery curves over binary ...
37 views

### Should I authenticate memory data which was loaded from authenticated disk file?

Encrypted fields are loaded from disk file to process memory only after file's HMAC validation is successful. Data is still encrypted in memory and will be decrypted later, on demand, when it needs to ...
173 views

### Backdoorable hash function in password database

I want to use a (preferably established) hash function that is backdoorable in a password database. I want to do so because I need password escrow (being able to get the cleartext back. I want to ...
190 views

### How can I use the whole potential of DES?

I have recently programmed the DES algorithm. Right now it works just with integers (or better to say chars) in the range <0;255>. How can I use its whole potential - using just ASCII would be a ...
567 views

### Does key authentication in SSH protect from MitM?

How do cryptography in SSH(2) work (secure channel establishment, authentication)? Does key authentication in SSH(2) protect from MitM by providing authentication and integrity and why?
66 views

### Memory hardness of key derivation function through XOR-ring multiple matrix values

For theoretical purposes in order to enhance my own understanding, and NOT in order to create my own cryptography, I am asking a question about the memory-hardness of a key derivation function ...
33 views

### How to force non-negative int64_t output for blowfish encryption with int32_t input?

I would like to encrypt a series of small integers one by one. The range of them is about 0~10^8. The output must be non-negative int64_t integers. Since Blowfish is 64-bit cipher, I prefer to use it ...
42 views

### Reversible hash function

I met the following 'reversible hash' function applied on a data $d$ consisting of $d_1, \ldots, d_n$ words: $h_0(d) = 0, h_i(d) = c ∗ (d_i + h_{i−1}(d))$, for $0 < i \leq n$. $c$ is a small, odd ...
397 views

### ECC keys vulnerable to brute force attack?

I have started learning about Elliptic curve cryptography. Since the key size required in ECC is relatively lesser than the key size in RSA to provide the same amount of strong encryptions, I wonder ...
174 views

Suppose I want to keep a client's password database secure (not in plaintext), while still having access to the plaintext password. Now I generates a public/private keypair. Then I send the public ...
2k views

### Which one is fastest? Karatsuba or Montgomery multiplication?

Is there any complexity analysis between Karatsuba and Montgomery multiplication algorithms? It seems that Karatsuba is more general in the sense that is not modulo tuned while Montgomery it is. Does ...
80 views

### Is this MAC scheme secure?

Say we have a computationally secure Message Authentication Code scheme (Gen, Tag, Ver). Let $Tag'_k(m):=$ first half bits of $Tag_k(m)$. Let's assume the range of tags is $n$bits. Is (Gen, Tag', ...
81 views

### Find plaintext of RSA by solving extended euclidean algorith for two encrptions with two different exponents for same plaintext

This is my homework question (but I am not asking the answer to it): Suppose two users Alice and Bob have the same RSA modulus n and suppose that their encryption exponents eA and eB are ...
149 views

### Memory hard key derivation (password hash) using AES encryption

I am restricted on a certain environment involving PHP and am currently unable to implement new memory hard hashes such as scrypt (and I am not trying to compete with the likes of scrypt). My ...
55 views

### Truncating ciphertexts on ring-LWE schemes

On the section 5.4 of the paper Improved Security for a Ring-Based Fully Homomorphic Encryption Scheme, the authors explain how to discard some bits of the ciphertexts to get smaller ciphertexts and ...
54 views

### Why do $\alpha$ and the private key value in diffie-hellman should be from $2$ to $p-2$

I just started learning Diffie-Hellman Key Exchange. I couldn't get the reason of making $\alpha$ and private key for Alice and Bob constrained between $2$ and the prime number generated minus $2$ ...
607 views

### Why do stream ciphers use a nonce?

My question maybe will be stupid, but my problem is that I do not understand why stream ciphers need a key and also a nonce. As far as I understand, the keystream is generated with the nonce. The same ...
59 views

### how to calculate maximum data size of an RSA signature

I am reading a content, and am not sure if I follow how they come up with the maximum data size which can be signed by an RSA key. The author states: "...if you are trying to sign a message using a ...
87 views

### How were semagrams encrypted in the pre-digital era?

Historically messages in languages that use alphabets have been encrypted manually according to some kind of algorithm (e.g. mono- and poly-alphabetic ciphers). But how wew messages encrypted in a ...
92 views

### Is there any reason not to use EdDSA with Weierstrass curves?

I'm volunterely working for a crypto library and we're planning on adding Curve25519 support (finally). At the same point I had the idea of adding support for EdDSA in the same run. Our library is ...
152 views

### Confused about how chosen ciphertext attacks work?

When performing a CCA, the adversary gets the public key. At some point, he will send a message m to the challenger, and the challenger will send back either $E_{pk}(m)$ or $E_{pk}(r)$, where r is ...
97 views

### Can Pseudorandom values be used as secure keys?

I want to derive $n$ keys from a master key. I pick a master key $mk$ and use pseudo-random function (PRF) to generate $n$ pseudo-random values, $v_i=PRF(mk,i)$ where $1\leq i \leq n$. Next, I use ...
45 views

### Why are the first 4-6 characters from ssh-keygen (RSA) the same everytime? [duplicate]

New to StackExchange, so please bear with the newbie. At my current job we are often creating many ssh keys with ssh-keygen (RSA). One thing I have noticed is that the first few characters (say the ...
132 views

### Will entropy be lost by using a DRBG?

Lets assume we have a DRGB (deterministic random bit generator) which is seeded by a good true RBG (random bit generator). Before any bit has been read from the DRBG, the entropy is clearly the number ...
52 views

### How about a homomorphic integer sorting in a MPC context?

I want to implement the ATV-FHE scheme as described by Adriana López-Alt, Eran Tromer, Vinod Vaikuntanathan: On-the-Fly Multiparty Computation on the Cloud via Multikey Fully Homomorphic Encryption ...
195 views

### What are the roles of the simulator in simulation based proofs

I'm trying to better understand simulation based proofs in the UC model - but the guidelines to construct a simulator confuse me. To my understanding, the simulator is activated in two ways: ...
86 views

### Brute force attack multiple stream cipher

Assume that a scheme used to secure a specific system $Π=(Gen,Enc,Dec)$ which is thought have indistinguishable multiple encryption in the presence of an eavesdropper. For any adversary $A$ that can ...
21k views

### AES 256 Encryption - Is it really easy to decrypt if you have the key?

So this might sound like a crazy question but bear with me for a minute. I can't find any info on the internet and so am here, although this might have been a good place to start. I've recently ...
157 views

### How to verify a signature with openssl methods from the ECDSA class?

I'm trying to verify my signature like I explained in my question before. But I have some problems to program my own verification without the verify methods of openssl. Therefore I'm going on to use ...
111 views

### Key Derivation Function (KDF): Can a key derived from KDF be considered as a secure key?

Consider a case where we have a master key MS that is used in pseudo-random function to generate a set of pseudo-random values. Then we use key derivation function to derive a key from each of ...