# All Questions

75 views

### Perfect Secrecy of AES file Encryption

Why does AES file encryption not ensure perfect secrecy? I understand that $\Pr[E(K,M_1)=C_1] = \Pr[E(K,M_2)=C_2]$ given $M1\neq M2$ holds for perfect secrecy of a scheme. However, this seems to hold ...
77 views

### Problem with applying threshold scheme

For a report on threshold signature schemes, I have to explain a threshold signature scheme and give a simple example with numbers. A threshold signature scheme is a scheme in which a network of n ...
171 views

### Bcrypt input length vs collisions

I am currently implementing oauth2 bearer token authentication and am storing the tokens bcrypt encrypted. My question is how long should the tokens be to achieve maximum security. E.g. at what length ...
257 views

### lcm versus phi in RSA

In textbook RSA, the Euler $\varphi$ function $$\varphi(pq) := (p-1)(q-1)$$ is used to define the private exponent $d$. On the other hand, real-world cryptographic specifications require the ...
501 views

### Why do we require a CSPRNG's output to be indistinguishable from true random?

Everywhere I read, indistinguishability of output from true random is stated as a requirement for CSPRNGs. However nobody bothered to give the rationale for such a strong requirement. Specifically, ...
100 views

### How is RSA able to prevent brute forcing using the public key?

Bob calculates a private and public key. Bob sends his public key to John. Jeff is a third party unwanted member and manages to snatch the public key mid-transfer. John encrypts his message ...
53 views

### Is it secure to use TOTP with same key and different time-counters?

If I use TOTP to generate codes with different "expiration" time, using the same key for HMAC, will I create some kind of weakness?
92 views

### How can IND-CPA encryption be identity revealing?

This is problem 10 of Chapter 4 "Symmetric Encryption" (pdf) from Lecture notes by Bellare and Rogaway: An IND-CPA secure encryption scheme might not conceal identities, in the following sense: ...
48 views

### Certificate Path Verification of X509 Certificate

I have the trusted root certificate which I am validating using the self signed key. I also have the intermediate certificate, which i am validating using the root certificate. Now when i am ...
108 views

### How to exctract ECDH parameters from an OpenSSL-generated $G$?

I'm using ECDH for generating ECDH public parameters (p,a,b,G,n), I try to get this values using openssl ecparam -in cert.pem -text -noout For ...
108 views

### Stream Ciphers and cycling questions

For all PRNGs (including CSPRNGs) lets say there is a sequence x, y, z, then when the PRNG cycles back to x, then the sequence following it will be exactly the same as before. Is this true for all ...
543 views

### Can an encryption method be used as a hash function?

As I understand, there are a few requirements for a good hash function. Hard to find any message from a given hash Hard to find any 2 messages which give the same hash A single bit change in the ...
108 views

### What is the difference between CPA and IND-CPA?

I am writing a paper and I got comments from the reviewer that I don’t really understand. Is there any difference between a CPA (Chosen Plaintext Attack) and IND-CPA (Indistinguishability under ...
279 views

### Quantum on hash

Perhaps this has been answered before. Grover's algorithm should result in a 256 bit hash being complexity 128 bits to crack. I was wondering, what if you had a 512 bit hash , and xor'd the lower 256 ...
32 views

### Why the group order has to be prime for pairing-based cryptography [duplicate]

I'm trying to get into pairing-based cryptography and I don't see why the group order of the group G in the pairing function e:G*G-> G_t has to be a prime number. I don't find an argument why ...
156 views

### Is it possible to create “non overlapping” RNGs?

For example, let's say I want two cryptographically strong RNGs (R1 and R2). And I want them to have the following property: R1 (resp. R2) will never generate the same random number twice. R1 (resp. ...
45 views

### Is this distributed OTP scheme secure?

This is for a distributed system: we don't want to have to maintain synchronization of random streams neither enforce uniqueness of pads because this would require some synchronization. Alice and Bob ...
64 views

### Has there been any research on entropy efficient information-theoretically secure PRNGs?

I have an idea for an research project, but I am first wondering if it has been researched or implemented before. I think I have a way to come up with a set of PRNG algorithms which have the ...
64 views

### Combining md5 collisions to create more collisions

Given X1 and X2 such that md5(X1) = md5(X2) and Y1 and Y2 such that md5(Y1) = md5(Y2), and knowing the following property of md5: if md5(a) = md5(b), md5(a|s) = md5(b|s) is there a way to find ...
130 views

### DES and using the S-Box 1

Can someone please check my work and correct me if I am wrong, I am just starting to learn about DES. I am trying to solve the following problem: Show that ...
89 views

### Encrypting a 160-bit plaintext into a 160 bit ciphertext with a 128-bit Block Cipher [closed]

So I have a kind of interesting issue. I have a field in my data store which must take exactly 160 bits of information. Some users will choose to make this data encrypted, some won't, so some of those ...
118 views

### how to get the file used to brute force any encryption method [closed]

Bitlocker as example uses AES 128 Bit encryption as default - if it was brute forced how it can be done , I mean where's the file that will be brute forced to generate the password (If I'm right that ...
46 views

### PKCS#11 Sessions

I am maintaining an application that uses PKCS#11 to talk to a smartcard. Somehow a session gets generated, but i cant figure out where in the code. I am using c# and the PKCS11Interop wrapper. The ...
62 views

### Is it possible to add error propagation to OTP?

What would be the recipe to add error propagation to a one time pad? I.e. if I change a single letter in the clear text message, I want the encrypted message to change starting from that letter and up ...
191 views

### Why does GnuPG save an array of remainders when generating prime numbers?

In looking at GPG's gen_prime() function, found within the cyphers/primegen.c file of ...
24 views

### What is the process to get the n future key for DUKPT? [closed]

I need to get the n future key from my BDK and KSN.
72 views

### Diffie-Hellman secret key choices

I'm trying to understand why the secret keys used by Alice and Bob in Diffie-Hellman are $a,b ∈ ℤ∗p$. Say $a$ is $p - 1$, wouldn't the transmitted $g^a$ be 1 mod $p$ by $FLT$? Now anytime a ...
70 views

### How to generate backup key for PBKD functions?

I would like to encrypt some files using AES, Ill derive key from password using some standard PBKD function and use that as AES encryption key. My question is, if user forgets the main password, ...
77 views

### Why is GCM only usable for ciphers with a 128-bit block size?

All block cipher modes of operation that I understand are generic schemes. They are not restricted by key size or block size. So why is GCM restricted to 128-bit block size?
175 views

### How to use AES correctly in BPS Format Preserving Encryption

I have several questions on using AES 128bit in the BPS format preserving encryption Which modes are acceptable? (Should the block cipher used at each round be deterministic (ECB) or probabilistic (...
84 views

### Which ECB ciphertext stealing scheme is this?

I am stuck with identifying ciphertext stealing method with the following properties: mode of operation is ECB; recommended padding scheme for this application is PKCS#7, but apparently it is not ...
70 views

I read this post from Ben Tasker describing how to take control of a powerline network. Since I am interested in security, I tried to do the same thing, to see if it was possible. I used Devolo ...
193 views

### How can cryptographic signatures be somehow linked to a physical signature?

A few days ago, I was asked to sign an online document over DocuSign as well as on SignEasy, any the signature were accepted just by a physical signature sent over email or on the app. They did not ...
36 views

### Is it possbile to get same set of public and private keys twice while creating CSR ? If so where does the conflict happens !?

I'm new to cryptography and please clarify if my below assumption is wrong. Lets assume, that two different banks creating CSR and they get identical public and private key pairs of RSA. In such ...
75 views

### Is it safe to use single-block AES for mutual authentication?

I read the question Symmetric mutual authentication with client using a derived secret and its answer which, if I'm not mistaken, assert that it should be safe to use the proposed protocol for mutual ...
55 views

### How exactly is an enigma simulation software supposed to encrypt alphabets?

EDIT: The model I'm trying to make is "Enigma 1". I learned initially about it from a book called "Code Book" and then looked at it in detail from its wikipedia page. The rotor wiring and other ...
113 views

### Why is the tweak length 64bit in BPS FPE algorithm?

In the algorithm for BPS Format Preserving Encryption Is this tweak always the same length (64bit)? Why did they choose the length 64bit for the tweak?
71 views

### Paillier cryptosystem, small integers and range of values

First, this a different take on my previous question: Pailler encryption of small integers to 32-bit integers I have to encode small integers (range 0-50) using the Paillier cryptosystem. Those ...
1k views

### generate RSA public key having public modulus and exponent [closed]

i want to generate an RSA public public key file using openssl (or other tools) having public modulus and exponent, so i can use it later to encrypt files i have this: ...
124 views

### PKCS#7 message content

I am using a vendor library that signs a text producing a PKCS#7 message. I'm not sure of the content of this message. Does a pkcs#7 message have to contain the signed message, the certificate, the ...
179 views

### Is there a way to encrypt an integer within an arbitrary range?

I need an algorithm that can take an integer, an arbitrary range, a key of 16/24/32 bytes, and an initialization vector of 16 bytes(ideally), and return an integer in the same range. My latest attempt ...
134 views

### Need some understanding on RSA public key exponent

I am new in cryptography domain and try to build some understanding on RSA key pair generation. My doubt is on RSA public key exponent value . Can exponent be any value (prime or non prime numbers)? ...
275 views

### How can a Encrypt-And-MAC scheme be insecure if the encryption is CCA secure?

I was presented with this seemingly paradoxical information, and am hoping someone can explain what I'm missing here. I have an encrypt-and-mac scheme here.If I want to transmit message m to Bob, I'd ...
35 views

### What are the number of output bits of the internal function F used in BPS algorithm?

In the BPS specification document it says We denote by f the number of output bits of the internal function F What is this if the internal function is AES? Would it be the block size (e.g. 128)?
71 views

### TLS_PSK and perfect forward secrecy

My question is about how difficult is for someone having compromised the PSK and sniff all (DT)LS handshake, (so getting the NONCE), to get the encryption keys? I understand : getting the pre-master ...
106 views

### Do ECDH and ECDSA combined solution provide an authenticated protocol exchange solution in MCU environment?

I'm working on a project in MCU (micro controller) environment with GPRS connection to exchange data securely with the cloud. The encryption algorithm has been selected to use AES. I did some search ...
343 views

### Encryption Algorithms in Verilog code

Can we implement Encryption Algorithms like RC4,AES and DES in Verilog? if no what are the limitations?
62 views

### Secure “table-look-up” operation

I am thinking about this problem: The server has a two-column table $T=\{c_1,c_2\}$. A user has a query $q$ that is sent to server. The server find an item $x$ in the first column satisfying $x=q$ ...
I have to show that the following construction of $q$ allows to factorize $N$ : $p \in \mathbb{P}$, the set of primes $q \gets p \cdot \left((p - 1)^{-1} \bmod e\right) \bmod e$ $k=1$ while \$q \not \...