# All Questions

139 views

### Is this how padding can work?

So for block ciphers you need a fixed size block. If the plaintext length is not a multiple of the block length then you need to pad it. One way you could do this is that for the last block you just ...
3k 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 ...
916 views

### Relative merits of AES ECB and CBC modes for securing data at rest

I need to store several million Payment Card Numbers (PCNs) securely in a mainframe database (that is, 'at rest'). I assume that any attacker will have access to all of the stored data. I assume the ...
173 views

### Proof that a function constructed from a PRP is, or is not a PRF?

Let $E$ be a family of Pseudo-Random Permutations of $b$ bits, with $E_K$ indistinguishable from random permutation with effort less than $O(2^b)$, easily computable as well as the inverse ...
59 views

### Secure MAC implies that probability of same tags on different messages is negligible

So let any secure MAC (message authentication code) be given. Intuitively, I think it is clear that the probability of getting the same tag on two different messages is very small, i.e. negligible. I ...
122 views

### iterated discrete log problem

Consider the following problem: given $g_1 \ldots g_i,h_1 \ldots h_i \in G$, $\forall i$ find $x_i$ such that $g_i^{x_i}=h_i$ For $i=1$ this is the discrete log problem and is assumed to to have ...
538 views

### Implementing AES in C++: 4x4 Array of unint8_t, or 4x1 array of uint32_t?

I'm implementing AES in C++, and, inspired by the way words are handled in SHA, I decided this time to handle the state as a one dimensional array of 4byte unsigned integers as opposed to a two ...
434 views

Is the initial AES key (expanded to the key schedule) byte padded if less than e.g. 16 bytes? Is there a safe way of determining if decryption was successful (i.e. used the correct key)?
141 views

### Ring Signature - paper/code difference in trying to solve inverse trap door function?

there is a paper on ring signatures and a python implementation of it here. The Step 4 in the paper describes $y_s = v =C_k,_v(y_1, y_2, ... y_r)$ for all $1 \leq i \leq r$ where $i \neq s$. The ...
187 views

### Why does OAEP have 2 rounds with 2 random oracles?

I strive into understanding why OAEP has two rounds of computations and not just one. I.e: Wouldn't it be safe to hash the random number r and XOR it with the original message?What security risks if ...
1k views

### Is it safer to encrypt twice with RSA?

I wonder if it's safer to encrypt a plain text with RSA twice than it is to encrypt it just once. It should make a big difference if you assume that the two private keys are different, and that the ...
246 views

### Word-based stream ciphers vs “regular” stream ciphers?

Could somebody explain what is the difference between "word-based" stream ciphers and the regular ones? Those last ones use pseudo-random sequences XOR'd bit by bit with the message, as far as I know. ...
951 views

### How to prove that the concatenation of two secure PRG is secure?

Given $G:\{0,1\}^s \rightarrow \{0, 1\}^n$ a secure PRG, how can one prove that $G'(k_1, k_2) = G(k_1) \cdot G(k_2)$ is secure ($\cdot$ means concatenation)? In other words, I'd like to show that if ...
441 views

### What does Maj and Ch mean in SHA-256 algorithm?

I'm guessing they're some kind of standard function but what do they do and what do the names mean? A little explaination or link me to an article would be great.
338 views

### Fiat-Shamir signature [closed]

I have a question about Fiat-Shamir signature: A hash function is h(w)=w mod 2011 and w1=2623, w2=3269, w3=1938. What is h=? and how to determine k.t bits?
293 views

### Efficient set up for a Montgomery multiplication

Montgomery described an efficient method to compute a modular multiplication. This works by using a special constant $R$ and assumes the inputs $a$ and $b$ have been made into a special representation ...
294 views

### Which risks are associated with deriving multiple keys from the same DH secret Z?

NIST recommends Krawczyk's HMAC-based key derivation function (HKDF) in SP-800-56C (PDF). HKDF shall e.g. be used to create keys from shared secrets after Diffie Hellman key establishment. NIST ...
247 views

### Why shouldn't one build a MAC by XORing multiple message blocks?

I found this simple proposal for a MAC algorithm: Let the MAC of message M (which consists of message blocks $M_1$,$M_2$, ..., $M_n$) be the AES encryption with key K of the XOR of all the ...
574 views

### What is a trapdoor permutation?

Can anyone explain to me what a trapdoor one-way permutation is? Is RSA a trapdoor one-way permutation? Context: I was reading about ring signatures. On page 560, it describes steps to ...
116 views

### Quadratic Sieve Bottleneck, Multiple Polynomials an option?

After my failed attempt at trying to implement the ECM, I started working on the quadratic sieve. It works, but the bottleneck is finding smooth values over the factor base. The way I implemented it ...
164 views

### Breaking RSA, given a special kind of oracle that decrypts related ciphertexts for us

Let $c=E^{RSA}_{e}(w)$ be the ciphertext belonging to the plaintext $w$ if an $RSA$ system is used. Assume that the public exponent $e$ satisfies $e \le 10$. Furthermore, assume there is an oracle ...
162 views

### Montgomery Exponentiation - selecting input value R for a given BigInteger

I have Montgomery exponentiation working, but it's working quite slow. I suspect there are two reasons for this - I implemented it bit size instead of word size (I didn't realize at the time that ...
236 views

### How do unkeyed hash functions (for MDCs) provide security?

Unkeyed hash functions are, by definition, hash functions computed without a key. SHA-1 is an example. MDCs (message digest codes) are a subclass of unkeyed hash functions. How are unkeyed hash ...
297 views

### Why are these specific values used to initialise the hash buffer in SHA-512?

I'm reading the book Network Security Essentials written by William Stallings. To create a message digest with SHA-512, we have to go through some steps: append padding bits. append length ...
76 views

### Why do we always append padding bits in SHA-512? [duplicate]

Possible Duplicate: In the SHA hash algorithm, why is the message always padded? I'm reading the book Network Security Essentials written by William Stallings. To create a message digest ...
7k views

### Difference between stream cipher and block cipher

A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time. A block cipher ...
517 views

### How does a client verify a server certificate?

As far as I know, when I request a certificate from Verisign (for example), and after they approved that me is me, they create a certificate (for me) which contains the digital signature and public ...
283 views

### Why do we need Hash by key?

(i'm just trying to find what am I missing...) Assuming John have a clear text message , he can create a regular hash ( like md5 , or sha256) and then encrypt the ...
100 views

### On the fly key generation for cloud storage objects

Cryptographic key management involves storing and managing encryption decryption keys , certificates , signatures etc . If the requirement is just to store and manage object specific keys ( say ...
591 views

### Is it possible to crack a blowfish 256 bits encrypted file? [closed]

I have a file of my own that I have encrypted using Coder-Abi. Now, I can just remember part of this password. So, would it be possible (much easier) for me to crack it knowing only part of it? I can ...
671 views

### How can I use eulers totient and the chinese remainder theorem for modular exponentiation?

I'm trying to implement modular exponentiation in Java using Lagrange and the Chinese remainder theorem. The example we've been given is: Let $N = 55 = 5 · 11$ and suppose we want to compute ...
547 views

### Blowfish: hex digits of pi used for s-boxes?

Preface: here is the official site for the Blowfish algorithm: http://www.schneier.com/blowfish.html The Blowfish algorithm uses an s-box, which consists of hex digits of pi (found here: ...
843 views

### Cryptanalysis of Linear Feedback Shift Registers

It is well known that simple m-sequence linear feedback shift registers have a linear algebraic structure and therefore the generator seed can easily be deduced using the Berlekamp-Massey algorithm. ...
396 views

### Randomized algorithms and the one time pad

The way I understand it, an algorithm is said to be randomized if it uses randomness as part of its logic (quoting Wikipedia). Now, in the case of encryption algorithms, I assume this means that for ...
124 views

### Slow hash algorithm that does not require salt?

I usually choose bcrypt when hashing as I can set the work factor to slow down the calculations of the hash. However, I have to keep a copy of the hash in order to verify it (since it includes the ...
608 views

### Constructing a block-cipher from a hash function

It is possible to use a hash function to construct a block cipher with a structure similar to DES? Because a hash function is one way and a block cipher must be reversible (to decrypt), how is it ...
2k views

### Advantage of AES(Rijndael) over Twofish and Serpent

I'm trying to figure out a suitable encryption technique and after reading a bit, I figured the current AES 128-bit encryption is suitable for what I'm trying to do. However, this is more due to the ...
125 views

### Pseudo-random Number generation for Passwords

i want to know what is the best pseudo-random number generation algorithm for passwords? for example my scenario is I have to generate 5K pseudo-random bits from a user-supplied password(6 ...
422 views

### Carmichael number factoring

Unsure whether this is the right forum for this question, worth a try. The task im faced with is to implement a poly-time algorithm that finds a nontrivial factor of a carmichael number. Many ...
252 views

### Is there a security analysis of CryptDB?

Its interesting to see critical thinking being applied to cryptDB in contrast to all the hoopla around it here . cryptDB is not a major theoretical breakthrough but potpourri of technologies to make ...
237 views

### Why doesn't CTR mode require blocking?

I've been reading a bit about block cipher modes and I have a relatively straightforward question regarding CTR. In essence, I was hoping you guys would be kind enough to validate my understanding of ...
536 views

### finding collision for truncated SHA1 hash output

Suppose we truncate only 40 bits of sha1 hash output.hence it is insecure.how can we find two message as input which gives first 40 bits of hash as same value i.e we have to find collision for first ...
165 views

### Crack cryptographic hash functions using Toffoli gates?

Might it be possible that reversible combinatorial circuits (or some emulating software) are going to be used to get the input of the white box? I mean if I have constructed a proper reversible ...
237 views

### Finding partial pre-image of MD5 hash

I have the following requirement for hashing using MD5. H(A,B,C,X); Where values A,B & C are given. However X is not given. I would like to find out what value of X would give a hash beginning ...
190 views

### ECM Implementation is really slow

I followed the algorithms 14.4 (computes 1st and 3rd coordinates in (X,Y,Z)#k modulo n) and 14.5 (factorization using ECM) in David Bressoud's book 'Factorization and Primality Testing'. I think the ...
832 views

### RSA and prime difference

It is known that the two prime factors $p$ and $q$ of an RSA modulus $n$ should not be too close to each other, otherwise an attacker may factor the modulus. In other words, \$\Delta = \left| p - q ...
277 views

### Can there be two hash functions without common collisions?

Is there a way to prove/create (or are there known hash functions) two hash functions that never have the same collision? I mean, like provable in way that someone who took one cryptography class in ...
602 views

### Explanation of the Decision Diffie Hellman (DDH) problem.

I'm extremely new to crypto, and very much inexperienced. Lately I've been reading about the Diffie-Hellman key-exchange methods, and specifically about the computational diffie-hellman assumption vs. ...
680 views

### How can I break a Vigenère cipher with partial plain text?

I have an exercise to do regarding Vigenère encryption. I've got the cipher text: WNZTNVIEEGTJYKRRWYUELWNZTNV and a partial plain text: ...
261 views

### Why does HOTP use such a complex truncate function?

In the HOTP protocol after calculating a 20 byte hash it is truncated to 4 bytes. For this first an offset is calculated (low-order 4 bits of the last byte) which determines the four bytes to be ...

15 30 50 per page