# All Questions

118 views

### Block cipher mode with diffusion on ciphertext

As I understand, diffusion property in AES-CBC ensures that one-bit change in plaintext will yield changes in all following blocks in ciphertext upon encryption. I'm looking for algorithm that will ...
112 views

### Self verifying hash algorithm

For quite some time I've been thinking about the idea to construct a hashing algorithm that contains its own checksum value, and thereby can verify itself. With hashing algorithms like SHA1 and MD5 ...
148 views

### Repair AES-128 decrypted file

I decrypted a file which was encrypted with OpenSSL and AES-128 with the wrong password. Before I noticed it was the wrong password I removed the original file. Is there a possibility to reproduce the ...
54 views

### What is the probability of finding 4 equal bytes? [closed]

Is it $2^{-32}$ or $2^{-24}$ as one byte is assumed to take a given value and the remaining 3 bytes should have the same value?
102 views

### AES key from encrypted text and VI

So I'm trying to figure out if it's possible to extract the private key if you have the ciphertext and the IV corresponding to that ciphertext. It's for some kind of a challenge, and can't really ...
52 views

### AES different modulo operations

I don't get the modulo 10001 operation in mixColumns so much. If I have to take the byte computations mod 100011011 anyway what leads me to a result of 4byte length, why do I need the mod 10001 ...
52 views

### Will the complement of a 64-bit key and message produce the complement ciphertext if ECB is used in DES?

Say I have a 64-bit message/key: P1: 1011....... K1: 0101....... I run this message/key pair through DES in ECB mode and obtain some cipher that looks like the ...
2k views

### Twofish vs. Serpent vs. AES (or a combo)

I've seen some posts and info online, but they are from 2009, 2010, 2011 or 2012, which is 3-6 years ago, which is a very long time. So I'm looking for an up-to-date answer about which of these is the ...
70 views

### If you know the messages, and the results of HMAC(key, message) can you find the key?

If the attacker has 1 billion 4KB (random-noise) messages and sha256-HMACs for those messages (all using the same key), can they calculate the key that was used, before the universe dies?
101 views

### Reducing size of hash function

If I have some data I hash with SHA256 as hash=SHA256(data) and then copy only the first 8 bytes of the hash instead of the whole 32 bytes. How easy is it to find a ...
235 views

### Why don't PyCrypto and M2Crypto produce the same result as OpenSSL here (AES-128 ECB)

If I run the following, for openSSL: echo -n "0123456789abcdef0123456789abcdef" | openssl aes-128-ecb -nosalt -nopad | xxd and enter the key "YELLOW SUBMARINE", ...
115 views

### Figure out the encryption being used [closed]

There is a web API (for a game) that sends and receives data encrypted in hex format. I'm interested in accessing the api outside of the game client (mobile app). When sending a request with an ...
162 views

### Is Pseudo-Random Generator (PRG) in OpenSSL uniformly distributed?

I need to know can we use PRG of OpenSSL as a PRF?
65 views

### FIPS-Compliant SHA2

I want to use SHA-512 for hashing in a system that must be FIPS-compliant. When I look at the FIPS 140 list of approved providers, I don't see SHA from any provider as being an approved algorithm, I ...
95 views

### Is the idea of a known plaintext attack really that new?

As you can probably guess, I just watched The Imitation Game, which hasn't really gotten points for historical accuracy... During World War II, Turing and his team fret that they can't know the ...
52 views

### Identity-Based Encryption consist of four algorithms. Extract phase is one of them and it is done by PKG or receiver?

The Identity-Based Encryption consist of four randomized algorithms: Setup, Extract, Encrypt, Decryption. The Setup phase is done by Private-key generator, Encrypt by sender and Decryption by ...
61 views

### Are passwords generated from sine vulnerable to certain attacks?

A friend mentioned that he used the sine of a number, i.e. sind(54), to generate long passwords. This way he only has to remember sine 54 and have a calculator to get his password back. I am wondering ...
137 views

### Simple multiplication as an encryption method

There was a time when I wondered about multiplication as an encryption operation. That was when I was thinking in terms of modular multiplication. But how about based around simple multiplication. ...
69 views

### OpenSSL encrypted text length

OpenSSL block ciphers return length of the text as output of the encryption (envelope_seal()), and If I have to send the length over network, I append the length ...
185 views

### Client-Server application how can data be encrypted so only clients can read it

Requirements We are building a system that connects multiple clients through a restful API. It allows the creation of groups of trusted clients. We need a way to store group shared data encrypted ...
102 views

### Counter Mode with a sequence of zeros bits plaintext, is it secure?

I had a quiz last week in computer security course. There was a confusing question that I am still looking for a good and clear answer. First, I know that counter mode with a good block cipher is ...
98 views

### RSA generation of private key using public key

In RSA private key generation e*d ≡ 1 mod φ e is public, also n is public. How to prove mathematically, generation of ...
107 views

### CPA security of a stateless and deterministic encryption system

Why can no stateless and deterministic encryption system be IND-CPA secure? Is there a formal proof for it?
99 views

### Proof that $gcd(e, \lambda(N)) = 1 \hspace{1mm} \Longleftrightarrow \hspace{1mm} gcd(e, \varphi(N)) = 1$

What is the proof for the fact that $gcd(e, \lambda(N)) = 1 \hspace{1mm} \Longleftrightarrow \hspace{1mm} gcd(e, \varphi(N)) = 1$ Where: $N = P * Q$ where $P$ and $Q$ are both primes. $\varphi(N)$ ...
56 views

### Applications of GF(p) polynomials

A Galois field of the type $GF(p)$, where $p$ is prime, is normally expressed as the ring of integers modulo $p$. If my understanding is correct, it is also possible to represent its elements as a ...
84 views

### Is there a strong cryptographic reason for GCM's 2^39 - 256 bit limit?

In reading through the original GCM specification (McGrew & Viega '05), the composition of the 128 bit Initialization Vector as a concatenation of a 96b nonce and a 32b unsigned wrapping counter ...
130 views

### How much work is required to detect multiple collisions for a hash function?

Assume an ideal hash function of output size n bits, detecting one collision requires approximately 2^(n/2) evaluations of the ...
64 views

### display an image encrypted with ECB [closed]

On wikipedia there is an example of a picture encrypted with ECB: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_.28ECB.29 I just wanted to know how an encrypted ...
151 views

### How does RSA padding work exactly?

I've read everywhere online and people say plain text RSA is very unsafe. To make it safe you pad it but no examples are shown anywhere on how to do it. It's explained that random data is added to the ...
100 views

### Why can't I use ECB with some obfuscation for transient RAM?

I understand that ECB does not hide data patterns well. But my understanding is that it cannot be broken to "know" the underlying message. If that was the case, why can't ECB be used with some ...
110 views

### RSA signing security

I'm curious about the security of RSA signing with the same public private key pair when the same message is sent multiple times. It's my understanding that once you generate the hash of the message ...
106 views

### Automated testing of cipher security for import/export compliance [closed]

What do we know about systems that automatically test and grade cipher security. The application in mind would be for checking for compliance with import/export regulations. I imagine a system that ...
66 views

### Integrity protection in wireless sensor networks [closed]

I have done a lab about wireless sensor nodes and got in touch with encryption for the very first time. There are some questions on my sheet, especially on integrity protection (the attacker wants to ...
131 views

### How to implement the Salsa20 hash function?

I am currently implementing Salsa20 from the specification as an exercise in learning and self-flagellation. I have Sections 1-7 passing the test examples provided. I am now stuck on Section 8, The ...
74 views

### Discrepancy with reported key size for EDE ciphers in Qualys SSL Labs

The following two cipher suites were reported by Qualys SSL Labs as being 112-bit: SSL_CK_DES_192_EDE3_CBC_WITH_MD5 TLS_RSA_WITH_3DES_EDE_CBC_SHA However, all other references I can find say that ...
112 views

### Hardness of problem related to bilinear pairings

Let $e: \mathbb G_1 \times \mathbb G_1 \rightarrow \mathbb G_T$ be an efficient bilinear pairing. Note that the pairing is symmetric (i.e., Type 1). The problem is, given $g \in \mathbb G_1$ and ...
118 views

### Is my method symmetric encryption?

To obfuscate data I made up this method on the spot without planning since the goal wasn't real encryption. At first I though this cannot be real encryption but after revisiting the code and reading ...
133 views

### Is a Combined Linear Congruential Generator secure for cryptography? [closed]

I learnt that a Combined Linear Congruential Generator (cLCG) has better properties than a Linear Congruential Generator (LCG). For those who don't know what a cLCG is, here are three links that might ...
218 views

### what is it called when encrypt('a') + encrypt('a') == encrypt('aa')?

So normally if you do encrypt('a') twice in a row you'll get the same result. But sometimes (as is the case in SSH) this is not desirable. You want encrypt('a') + encrypt('a') == encrypt('aa'). What ...
50 views

### How to use HMAC for authenticating multiple messages

The standard HMAC function, $H(K, m)$, authenticates a single message $m$. Instead, I'd like to authenticate 2 messages, like this: $$H'(K, m_1, m_2)$$ The simplest solution, $H(K, m_1||m_2)$, ...
97 views

### Prime Numbers in Discrete Log

I am implementing a security protocol based on discrete log. I came across the equation $p = kq + 1$. Understand that based on number theories that both $p$ and $q$ should be large enough to be ...
65 views

### Post-quantum hybrid encryption

Assume the following simplified protocol: seed = curve25519SharedKey(theirPublicKey, myPrivateKey) sharedKey = scrypt(seed, salt, sufficientlyHardWorkFactors...) cipherText = aes256(sharedKey, ...
69 views

### “Kernel attack” on MinRank — why do we guess $\left\lceil \frac k n \right\rceil$ vectors?

The kernel attack on MinRank is described here (page 5). My question refers to this line: Note that if $m = \left\lceil \frac k n \right\rceil$, the system essentially has only one solution ...
217 views

### What would be the best plain text Cryptography method without the use of a computer? [closed]

What would be the best Cryptography method without the use of a computer? This could be a list of the current options available, that could be used without the use of a computer ...
84 views

### Looking for a secure PRNG that I can implement in hardware

I'm trying to implement a (sort of) simple PRNG in hardware for fun. My idea would be to allow a user to enter a key using a keypad (or some dip switch settings that can be set and hidden) and to ...
105 views

### What are the potential (major) flaws in this security scheme?

It’s been a few years since I read anything involving crypto. I’ve come across this scheme and I wonder how secure it is: Alice generates an RSA keypair (we assume Alice is using proper random ...
94 views

### rotational cryptanalysis on modulo multiplication?

I saw the paper 'Rotational Cryptanalysis of ARX', it is effective against design primitives using XOR, addition, and rotation. http://www.iacr.org/archive/fse2010/61470339/61470339.pdf However ...
78 views

### Polynomial Modulus

So I am studying for finals and I came across this problem and I am completely stuck. I would really appreciate someone to clarify on the steps to take to solve these problems. Let \$f(x) = x^4 + x^3 ...