# All Questions

230 views

### plaintext and its encrypted version known [duplicate]

I have a (long) text in two versions, encrypted and plaintext. I think it was encrypted using a substitution cipher method (I'm pretty sure, indeed). I'm not good in this matter, I know little about ...
327 views

### Is OpenPGP vulnerable to the “crypto doom principle”?

From reading RFC 2015 (MIME security with PGP), and from looking at the raw format of (GnuPG) encrypted and digitally signed email messages, it seems that first a signature is calculated from the ...
328 views

### Winternitz One-Time Signature

I am reading the page 38 in this "Post Quantum Cryptography" book (Equations 8 and 9). My question is, why to compute the verification key $Y$, $f$ is applied $2^w-1$ times? Are there any security ...
344 views

### Block cipher with key longer than block size

When a block cipher key length is greater than the block length, is it the case that for some keys $k_0, k_1$ (with $k_0 \not= k_1$) and plaintext message $m$ that $E_{k_0}(m) = E_{k_1}(m)$?
105 views

### Is Triple-DES a group?

I know for a fact that DES is not a group, but are any of the Triple-Des versions a group? Why, or why not?
200 views

### How does Poly1305 in the NaCl library calculate a MAC?

I've been reading about Poly1305 as implemented in the NaCl library, more specifically I've been referring to this Java implementation of NaCl. My understanding of XSalsa20Poly1305 (in this ...
422 views

### length extension attack on an MD5 hash of a text file of about 10K Bytes?

How much computing time on a typical desktop computer would it take to find a new length and new data to extend a text file of about 10K Bytes with a given MD5 hash?
101 views

### Encrypt user email but be able to find user by email

Sorry for my dumb question, but it's better to ask dumb question than to do dumb things silently. I want to encrypt user email in my DB so that if someone stole the DB (and not the key) - he won't be ...
194 views

### Does SRP reduce to DH key echange when shared password is not secret?

I can find JavaScript implementations of SRP (Secure Remote Password protocol), but nothing that inspires confidence for Diffie-Hellmen key exchange. I also have a separate need for SRP later. I ...
200 views

### Attacking AES/CCM with random IV

A cryptosystem is using AES-128 in CCM mode with random IV. Suppose an attacker capable of: asking the cryptosystem to encrypt a single plaintext as many times as he wants; and asking the ...
162 views

### How can a key pair be derived from an arbitrary hash?

If I correctly understand the concept of a "brain wallet" in BitCoin, you start with a passphrase, generate the hash of the passphrase, then somehow derive a public / private key from that to use as ...
326 views

### How is ElGamal not secure under chosen ciphertext attack, but semantically secure in some cases?

I know that you can create a ciphertext c' using c and then find the corresponding m' for c' which you can use to find m for c. So, doesn't this mean that it is not semantically secure? But I also ...
382 views

### How can mega store my login details and still be secure?

I understand how Mega's encryption works. For a quick summary of all those in the future looking for an answer on this... here is how it works: Upon first signing up for an account you make a ...
254 views

### Is this method for exchanging private key using RSA sound?

Bob know's Alice's public key, and he wants to make sure he's connecting to the one which has that key. Furthermore, Alice wants to verify when she gets a connection from Bob who'll give his public ...
320 views

### What is the usual block cipher mode that goes with CTS

I am wondering: what is the most common, or most used, block cipher mode used that goes with CTS (CypherText Stealing)? Is it ebc or cbc?
141 views

### What information to include when calculating the HMAC of ciphertext

I'm aware that it's crucial to include the IV when calculating the HMAC of a ciphertext (assuming an IV is used). Can anyone explain, in simple terms, why this is? Furthermore, assume that there is ...
221 views

### Nonce role on stream ciphers

Modern stream ciphers usually predicts the usage of a nonce (also termed as IV) in the cryptosystem. The cost of initializing the cipher with the nonce varies from algorithm to algorithm (for ...
679 views

### Attack XOR encryption of binary data compressed by zlib with known key length (very short key)

I am trying to break a packet format. The packet format simply packs several files into one big file. The file contents are plain. But the index data which contain offsets, file sizes and filenames ...
578 views

### Hashing a password with SHA256 on the client then bcrypt on the server

I'm trying to implement a cryptographically secured storage site (not Mega, or anything similar) and am trying to prevent the user's password from ever touching the server. The password is used to ...
83 views

### Zero-knowledge identification of the majority commitment

Alice is communicating with $n$ people. We do not assume that the $n$ people don't trust each other or trust Alice. Alice doesn't trust them either, and needs to assume that they will not form a ...
325 views

### Decryption a chunk of file with AES

We are having a requirement to store large files (~1GB) encrypted and decrypt them when reading. We are looking to use AES-CTR or AES-GCM mode to encrypt the data. There are scenarios where we want to ...
165 views

### Secure communication between multiple peers on a public channel

I am wondering how can I secure communications between multiple peers over a public channel, like an IRC channel. With two peers it is easy - they exchange their encryption keys and decrypt the ...
126 views

### Discrete logs on elliptic curve with embedding degree 3 with the 'MOV' attack

The curve $E(\mathbb{F}_{47}):y^2=x^3+x+38$ has order $61$ and $61|47^3-1$ so the embedding degree of $E$ is $3$ and therefore the MOV attack, presumably using some sort of distortion map and a ...
442 views

### How can I calculate the time complexity of modular arithmetic?

I'm doing modular arithmetic in a Java program, and I want to calculate the time complexity of the individual operations. $$c= a · b \bmod n$$ $$m = a^{-1} · b \bmod n$$ How do I get an ...
176 views

### Finding a collision for a hash function

I'm trying to find a collision for the following (modified) Merkle-Damgard hash function. Suppose we already have a hash function $h : \mathbb{Z}_2^{2·n} \to \mathbb{Z}_2^n$ for fixed length bit ...
342 views

5k views

### Decrypt digital signature using RSA public key with openssl

I have a digital signature that was created using the following algorithm: a SHA-256 hash of the body of the message is calculated. It is then signed using an RSA private key and the result is ...
500 views

### Crack SHA1 hash code

Given a set of SHA1 hash code, if we knew a portion of the plaintext for each particular hash code, and also the remaining portion of the plaintext is a constant value for each hash code. Is it ...
780 views

### Optimising Pollard's Rho algorithm for large semi-primes

I have programmed an implementation of Pollard's Rho factoring algorithm using C++ and the GMP library. It is reasonably fast with large numbers, however I haven't implemented any form of cycle ...
3k views

### What exactly is addition modulo $2^{32}$ in cryptography?

EDIT: I've been confusing this the whole time. What I've been wanting to say this whole time is addition modulo $2^{32}$ not addition modulo 32 as the question originally said. Thanks for pointing ...
258 views

### Exact mathematical definition of simulation based security?

I've been trying to understand cryptographic protocols and how to define their security. The problem is that while I can understand what the intuitive definition says, I have trouble understanding how ...
214 views

### Constructing secure key exchange protocol

I have $\Pi=(Gen,Enc,Dec)$ and let it be semantically secure public-key encryption scheme. Security parameter is $n$, then the message space of plaintext is always $\lbrace 0, 1 \rbrace^n$. By using ...
913 views

### BouncyCastle Elliptic Curve implementation

I'm implementing ECDH key exchange in C# using the BouncyCastle library and I'm having a hard time understanding the elliptic curve side (FpCurve). ...
305 views

### implications of SSH server key compromission when authenticating users against a public key

Friday we had a disagreement with a colleague of mine about the implications of SSH server key compromission The question was stated as this : What could a hacker do while provided with the SSH ...
828 views

### Difference in one time key and one time pad and many time key

These terms are confusing me. One time pad is when you use one key for one message. That is what One time key is. Secondly, what is the connection of many time key, can i use one time pad many ...
487 views

### Is there a standard for OpenSSL-interoperable AES encryption?

Many AES-encrypted things (files, strings, database entries, etc.) start with "Salted__" ("U2FsdGVkX1" in base64). I hear it's some sort of OpenSSL interoperability thing a b c. Is there some ...
465 views

### Signature and Timestamp for Long Term Document Archival Question

I have a PDF document intended for long-term (many years, maybe decades) archival which I would like to digitally sign with my personal certificate to ensure its integrity. As far as I understand, I ...
201 views

### Signing 14 bytes of data

for an embedded device I need to sign a 14-byte string and want to verify that string on the device. Since there is already an AES-Library on the device, I thought about using the following scheme: ...
388 views

### Entropy of system data - use all and hash, or trim least significant bits?

I'm working on a background entropy collector for key generation that monitors hardware and produces an entropy pool. Here's my list of sources: Mouse position Keyboard timings (i.e. time between ...
318 views

### Encryption with private key?

we normally always encrypt by public key and decrypt with private key. If i encrypt with private key, then its still secure as normal PKI ? i mean known-plain-text will not take private key on the ...
273 views

### Vulnerabilities of encrypting data with known regularities

I need to encrypt data that has a pre-defined header and footer structure, and furthermore the data follows pre-defined patterns. The header and footer structure follow a defined structure but cannot ...
173 views

### Is there a way to compare the 923 bit pairing based key with RSA or AES, etc

I've see many articles, most of them basically the same, praising Fujitsu for cracking what is referred to as a 923 bit pairing based encryption. I understand that in comparing RSA to AES you've got ...
2k views

### In which order are the round keys used during AES decryption?

In the Add Round Key step in AES decryption, which part of the expanded key will I XOR first to the result of the SubBytes step? Is it the 10th round key? For example, is this the right order? ...