0
votes
1answer
86 views

Is there a correct way to generate a symmetric key?

Looking in some cryptographic algorithms, I've realized that: The way the plain text is encrypted/decrypted is always specified, but what about the key? Every paper I've seen describing the algorithm ...
1
vote
0answers
139 views

Best way to implement secure client/server communication in Python

For a college programming assignment I have to implement a secure communication protocol between a server and one or more clients. Upon instantiation of the server program, a file is generated, call ...
1
vote
2answers
156 views

Is my protocol that uses hybrid cryptography and AES-GCM secure?

I'm having a lot of trouble trying to understand how to implement AES-GCM. My usecase: Person A sent me a file with a gauranteed unique name. I want to be assured it was from person A, and that no ...
3
votes
2answers
111 views

How to find the value of a vector modulo a basis in lattice-based cryptography

In Gentry's paper on fully homomorphic encryption using ideal lattices, he finds the values of vectors modulo a certain basis. For instance: $\psi \leftarrow \psi' \mod B$ Taken from page 69 of ...
4
votes
1answer
133 views

How have MD5 constants been determined?

For instance, the per round shift amounts, ...
1
vote
0answers
38 views

ABE Attributes Based Encryption

I have a question . How the system know the attributes of the users to be after that as a public key in ABE?
1
vote
1answer
116 views

SHA-256 “almost unique”?

I have seen numerous references on the internet of people describing SHA-256 as generating an "almost unique" hash. Exhibit A. there are more. Is there some mathematical basis to the almost ...
5
votes
0answers
137 views

How to break a columnar transposition cipher?

I'm currently studying for a cryptography exam. I've been given ciphertext that has been encrypted by a columnar transposition cipher. I've been given no shift key length or key word, the only thing I ...
3
votes
2answers
73 views

Probabalistic Polynomial-time Algorithms & One-way functions

I've been reading up on probabilistic polynomial-time algorithms and one-way functions, and I was hoping to get some guidance on the topic. A textbook I'm reading states the following for one of the ...
0
votes
0answers
22 views

Prove that complement of plaintext and the key, then ciphertext will be the complement of orig. ciphertext [duplicate]

I'm trying to prove in general terms the following: y = DESk(x) then.. y' = DESk'(x') I can plug in random variables for ...
1
vote
0answers
97 views

Weird base64-like (?) encoding [closed]

I have some encoded strings which are probably encoded in a base64-variant - except that there aren't only 64 chars, but all the (printable) ASCII chars between 33 and 126 (0x21 to 0x7E). I've ...
0
votes
1answer
147 views

Calculating the average key search time of DES

I am trying to understand how to calculate the average key search time given a specific scenario: Suppose we have a program that uses standard DES with 56 key bits, and we can test 10^6 keys per ...
0
votes
0answers
36 views

Indistinguishability through a chosen plaintext attack

I have a question about how to go about doing an IND-CPA style attack. I'm supposed to think of this as two black boxes, where I do not know which box contains which function. What would I do with the ...
1
vote
0answers
18 views

Understanding CPA and CCA Secure [duplicate]

CPA attack means the attacker can send in his own plaintext to the oracle and receives some sort of ciphertext back. CCA attack means the attacker can send in his own ciphertext to the oracle and ...
0
votes
0answers
58 views

Performance of Fully homomorphic encryption VS Paillier encryption in Practice

Consider two schemes both have computation complexity linear to the input size (i.e. number of inputs). One scheme is based on Paillier encryption and the other one is based on fully homomorphic ...
3
votes
2answers
800 views

Generating unbiased numbers with a biased six sided die?

Eve takes a fair six-sided die and adds some heavy paint to the side of the die with the 6 on it. This results in a biased die that rolls a 6 with probability 2/7, and each other number (1-5) with ...
0
votes
1answer
41 views

What does CA certs contains? public key of site or CA?

I believe it contains public key but whose? the site like a bank or the certificate authority who has signed?
3
votes
2answers
105 views

Is it safe to initialize secret keys by just reading /dev/random on Linux?

For a software, I don't want the user to choose weak keys, so I plan to just read the needed number of bytes from /dev/random to create the needed secret keys. Is it safe to do so?
31
votes
3answers
411 views

How does RSA compute such enormous numbers?

So I have been reading and learning a lot about cryptography lately and in particular asymmetric ciphers such as RSA. One thing that I am curious about but never seems to be mentioned is how the ...
2
votes
1answer
160 views

RSA 1024 bit forge a new matching signature from a chosen message

I have an RSA signature scheme with 1024-bit key where I know the following: Public modulus $N$ Public exponent $e=3$ A lot of signatures Summary: To compute a signature, an MD5 hash is ...
3
votes
2answers
627 views

Is it possible to apply hill-climbing algorithm to Diffie–Hellman?

If Eve intercepts all the values communicated between Alice and Bob in a Diffie–Hellman key exchange, and applies the hill-climbing algorithm to reverse the modulo function, how will the algorithm ...
1
vote
0answers
25 views

Data in frequency modulated audio [closed]

I'd like to have a peek at the firmware of a piece of Hardware. Its firmware is available as a .wav file to be uploaded via audio jack. https://drive.google.com/open?id=0B6S_PcWWM1YlQnNwT2FSMnFzVE0 ...
1
vote
0answers
28 views

Is a timing side channel attack effective when the leaked information is related to the result of a hash?

I'm writing a function to act as a cryptographic hash of a number within a range that returns another number of the same range. The catch is that the result needs to have certain properties. I run a ...
0
votes
1answer
50 views

How can I prove I have a certain Facebook account by signature?

I would like to know how to prove I have certain Facebook account (or that I can login to that account).
2
votes
0answers
20 views

Does the length of the keyword used for keytable for Playfair matter?

So for Playfair, we choose a keyword and put that in the keytable with no duplicates. Then, we fill the rest of the table with alphabets in order that are not in the keyword without 'J'. Does the ...
1
vote
1answer
47 views

Is it safe to use MD5 in a proof of work system?

Here is the POW system: you are given a string and you need to compute a suffix so that first few bits of the MD5 value are all 0. I know MD5 is collision vulnerable, but is it safe to use MD5 here, ...
1
vote
0answers
27 views

ephemeral-ephemeral ECDH and MITM attack [duplicate]

ephemeral-ephemeral ECDH is it susceptible to MITM attack ? if yes, can you please give me a detailed answer ( Workflow that can be followed by the attacker) and how we can prevent this attack ...
1
vote
1answer
49 views

Byte size of Diffie-Hellman public values

I have a scenario that uses RFC-3526's Diffie-Hellman Group 14 for 2048 bit key exchanges. From the document, it specifies the P (prime) value in hexadecimal value as: ...
0
votes
3answers
72 views

Perfect hash function

Is a perfect hash function always bijective ? In Wiki "In mathematical terms, it is a total injective function" but it does not mean, that it is bijective.
0
votes
2answers
69 views

hash functions preimage and second collision resistance [duplicate]

A hash function H is secure in terms of pre-image resis-tance. Does this imply that H has second pre-image (aka weak collision) resistance?
1
vote
0answers
60 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 ...
2
votes
0answers
69 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 ...
1
vote
1answer
85 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 ...
5
votes
2answers
180 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 ...
8
votes
3answers
487 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, ...
1
vote
1answer
75 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 ...
2
votes
2answers
40 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?
1
vote
1answer
86 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: ...
0
votes
2answers
39 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 ...
4
votes
1answer
64 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 ...
2
votes
1answer
91 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 ...
8
votes
4answers
476 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 ...
2
votes
1answer
93 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 ...
8
votes
1answer
275 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 ...
1
vote
0answers
29 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 ...
1
vote
1answer
128 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. ...
1
vote
1answer
43 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 ...
2
votes
1answer
53 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 ...
3
votes
0answers
49 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 ...
1
vote
1answer
77 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 ...

15 30 50 per page