# All Questions

87 views

### Post processing of AAD and len A||C in a hardware AES GCM implementation

I'm new to GCM and I need to implement it in hardware, using FPGA. The data bus is 640 bits, so I will use 5 adder/multiplier blocks in parallel. The message size and AAD size are constant. My design ...
93 views

As always we are trying to improve password storage; before just adding new ways of storing our password we need to define what threats we will mitigate by adding in a new way to store our password. ...
389 views

### Plaintext XOR'd with keylength-shifted plaintext

While solving a (easy...) Project Euler cipher problem this week I repeatedly saw instructions for breaking ciphers after identifying the keylength as: 'shift the ciphertext by that key length and ...
293 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 ...
179 views

### How exactly to extract information base 10 from a PGP RSA key pair?

I think I understand the mathematics of RSA ok. I'm not so computer savvy though. How, exactly, can I extract $n$, $e$, $d$, $p$ and $q$ from a PGP RSA public key pair? Is there like a converter ...
242 views

### Smart Card - Entropy during on-board public key generation

I know that some (advanced) smart cards or tokens allow generating key pair directly on the device, but I wonder how the card can gather entropy during the process. Any idea ?
272 views

### (Re-)Using deterministic IV in CTR mode / How to: deterministic AES

I am aware of the requirement of an IV to be unique in CTR mode (Why must IV/key-pairs not be reused in CTR mode?). However I wonder if I can use an IV depending on the plaintext deterministically. ...
125 views

### Size of a MAC for a quickly checked message?

Let suppose that we have to check a message that was written one second ago. The message is discarded immediately after having being checked. What "minimal" size for such a MAC is secure ? Thank you. ...
88 views

### If I know the salt, can I decrypt the commitment?

Say, I salt my key(K) with y. So, my new Key is K' = Salt(K+y). Now, Alice sends commitment = E[K',M] to Bob. Bob knows the salt(y), but not K nor K'. Can Bob decrypt the message?
247 views

### Are there cryptographic hash functions which do not have any collisions?

I've been studying digital signatures and hash functions recently, and I was wondering: Do hash functions exist which will never produce collisions?
55 views

### Is AES_CMAC specified to double ciphered zeroes during initialization?

Reading the SIV RFC https://tools.ietf.org/html/rfc5297#page-9, I found that the S2V function starts by calculating the MAC of a "zero" block, doubles it and then XORs further data to the result. Now ...
108 views

### Is BBS used for generation of keys for any modern cryptosystem?

Is there any (current) cryptosystem or digital signature or cryptographic primitive that uses the BBS PRG in order to generate its secret keys?
82 views

I have RTS game, where all players run game and server just relays messages. Game can generate and store text file on player pc. I want to allow some players to be moderators, so I need to sign or ...
62 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)$, ...
110 views

### Is it possible to decrypt this message with partially known data? [closed]

The following highlighted text must contains 547a5e0e008be33730158d63ce844e67 data. I don't know about encryption method and key. Is it possible to decrypt it? ...
399 views

### can anyone give the java code to encrypt files using paillier [closed]

I want to implement encryption on personal files using paillier encryption. Is it possible to encrypt files using this encryption..
63 views

### emulating progressive encryption with RC4 / OpenSSL

PHP's OpenSSL bindings do not support progressive encryption by default. ie. if you do ...
11k views

### What is the SSL private key file format?

I was researching about how to encrypt with RSA. I understood everything but not the format of the private keys. In the phpseclib (RSA in PHP), you can import your private key (private.key format) ...
326 views

### Discrete logarithm modulo a smooth number

I am solving the discrete logarithm problem modulo $N$. $N$ is a composite number, I found its factors — lots of small primes and two big primes ($> 2^{50}$). Does the factorization of $N$ somehow ...
185 views

### Attribute-based broadcast encryption with respect to ABE

What is the exact difference between attribute-based encryption (ABE) and attribute-based broadcast encryption (ABBE)? Is ABBE equivalent to broadcast encryption on top of ABE?
1k views

### PRNG determinism (and java.security.SecureRandom)

Looking at getDefaultPRNG() in java.security.SecureRandom makes me very unsure about how to use it. On my desktop, it uses sun.security.provider.NativePRNG, which reads from ...
284 views

### Can we quantify strength of encryption scheme ?

Was wondering if we have any (or can we come up with) "units" for strength of encryption like in Physics. Most of our comparative analysis of encryption schemes are based on number of S boxes or ...
209 views

### Is the DES F-function injective for a given subkey?

Is it possible for two different half-block inputs to the DES F-function, with the same round subkey, to produce the same output? That is, if we feed two different half-block inputs $b_1$ and $b_2$ ...
126 views

### Preventing Quantum Attacks on Cryptography [duplicate]

With the advancement of technology in quantum computing, it's becoming more evident that we need to start thinking about protecting the future integrity of our cryptographic standards. What can we do ...
422 views

### What cryptography is suitable to motivate High School students to learn math?

A High School math teacher in the Bronx asked me if I knew of any way to use cryptography in a way that motivates students (15 to 18 years old) to learn math. I do know that many of them want to ...
430 views

### Attack an stream cypher using 2 XORed LFSRs

We know that the Key were generated by 2 16Bit LFSRs (output of both is XORed together -> key) I already extracted a 64 Bit key sequence, but how can I calculate the polynom of the LFSRs (and the ...
128 views

### Possible to know who is the owner of a message encrypted with RSA public key

Given the scenario in which I want to send 10 messages either to Stalio or Olio. I encrypt these messages with their respective public keys using textbook RSA, before sending the messages to their ...
112 views

### Formal proof of theorem concerning the Random Oracle Model

Reading a book on cryptography by Douglas R. Stinson I've met the following theorem, which is stated without proof (see here). Thereby, $\mathcal{F^{X,Y}}$ denotes the set of all functions from ...
490 views

### Solving Quadratic equations in Galois Field (2^163)

Hello I am working on implementing a message to elliptic curve point mapping hardware circuit I have done some research and found out the koblitz mapping method: I will be using a field of binary ...
550 views

### DES generating the same ciphertext for different plaintexts and identical key

Is it possible to get the same output for DES while the inputs are different while using the same key? The key should not have to be a weak key. If yes could you give me a hint how to show how to do ...
151 views

### Do I have to transfer the private key to digitally sign a remote document?

I'm trying to digitally sign a document which is uploaded by a user. I want the user to sign that document using his digital signing certificate (DSC). Should I: transfer the file to the user, and ...
58 views

### Is there a way to “shorten” a Merkle chain?

If I have a Merkle chain of 3 items, is it possible to create a zero knowledge proof of the existance of a correct chain between hash 1 and hash 3? Editing to clarify (Thanks Ricky), what I mean my a ...
197 views

### Power analysis and exponentiation by squaring

I am trying to understand how one can retrieve the secret exponent via a simple power analysis. Lets suppose that the exponentiation by squaring algorithm is implemented in its simplest form : ...
681 views

### What are the security implications of multiple hashing?

There are plenty of questions on this site about hashing passwords. However, none of them quite cover this topic. One of those links covers using multiple different hash algorithms; one covers general ...
2k views

### How are random numbers for RSA generated? [duplicate]

The RSA public key encryption requires two very large prime numbers as part of its encryption process that serve as secrets. These are typically generated with cryptographically secure random number ...
223 views

### Can I simulate iterated AES-ECB with other block cipher modes?

I am trying to write some code using the Web Crypto API (http://www.w3.org/TR/WebCryptoAPI/#algorithm-overview) which provides only some of the block cipher modes for AES, intentionally excluding ...
408 views

### Diffusion in Stream Cipher

The diffusion property of a cipher defined by Shannon refers to the ability of a cipher to cause a lot off bits in the cipher text to be modified, when even a single bit in the plaintext is flips. ...
105 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 ...
157 views

### Luby-Rackoff on Feistel ciphers [closed]

On page 46 of these lecture notes, it seems to say that if we have a Feistel cipher, and plaintexts $(L_0, R_0)$ and $(L_0^*, R_0^*)$ with corresponding encryptions, then we can determine the key? But ...
214 views

### Why would an Initialization Vector be supplied externally?

My software uses a 3rd party encryption appliance. One of the capabilities they allow is for the client software to supply an IV while doing CBC encryption. Why would they not generate a random ...
92 views

### Which Block cipher mode should I use? [closed]

Which of the Block cipher mode is MOST secure? I dont care about the performance just the most secure
110 views

### What is Initialization vector (IV) [closed]

I am not the best cryptologer and therefore I have some questions so I learn more and get better. Heres the questions: What is Initialization vector (IV)? MUST I use it or not?
438 views

### Encryption and HMAC in a PSKC file

This is the PSKC standard https://tools.ietf.org/rfc/rfc6030.txt In Section 6.1 6.1. Encryption Based on Pre-Shared Keys They have the following ...
2k views

### Chosen plaintext vs Chosen ciphertext

What is the difference between chosen plaintext and chosen ciphertext attack? In both of these adversary has access to paintext-ciphertext pairs.Then where lies the difference?
150 views

### Embedded devices Authentication, Integrity and Confidentiality

Embedded devices send messages to the server. The server occasionally sends messages to individual devices(Reboot, upgrade firmware etc) After some research this is my ad-hoc solution: 1) Each ...
281 views

### test vectors for 3DES seem to in fact be testing DES - not 3DES

NIST SP 800-20 Appendix A has what presumably are supposed to be test vectors for 3DES except almost all of the test vectors utilize 8-byte keys and not the 24-byte keys that 3DES is supposed to have. ...
138 views

### Security concern about reducing hash value using modulo operation

As stated in the title, what I am looking for is information about a "technique" that I would like to use in some of my algorithms. Sometimes I need to map a hash function's result into a range of ...
150 views

### how to let other people respond to emails only decrypt-able with my private key

First of all I have to say it's a homework question but since I have no one to consult with, I ended up here :) Suppose a case in which you are the manager of a company and all employees encrypt ...
From Wikipedia: Second pre-image resistance Given an input $m_1$ it should be difficult to find another input $m_2$ such that $m_1$ ≠ $m_2$ and \$\operatorname{hash}(m_1) = ...