# All Questions

38 views

### Calculating Phi(M) and D for RSA decryption given p,q,e

I've been given a message in 4 digit numbers but it doesn't seem to work when I use my calculated values for phi(m) and d. If I'm correct phi(m) = (p-1)(q-1) correct? And d is given by ed = ...
27 views

### Test vectors representation

The test vectors listed in https://github.com/cantora/avr-crypto-lib/blob/master/testvectors/Mickey-v2-128-unverified.test-vectors Are represented as Hex strings? I'm sure that the key is, because ...
52 views

### RSA vs ECDSA/ECDH

So we've been using RSA for a while now. I wonder, is it still secure? I'm wondering whether surveillance agencies can at this point read traffic encrypted with say, TLS_ECDH_RSA_WITH_AES_128_GCM? ...
138 views

### Why do 1st and 3rd key have to be the same in 2 key 3DES?

From this answer: However, that wasn't the only situation they had in mind; they also considered the case where someone implemented 2 key 3DES in hardware (which the first and last subkeys ...
129 views

### Encryption that can only be decrypted once?

I want to encrypt a message so that it can only be decrypted once. I know that we can use nonces to do this when we exchange data over a communication channel, but in my case the cipher text will be ...
32 views

### If a PRG is constructed by iterating a PRF, is it backtracking-resistant?

Say we construct a pseudo-random number generator from a pseudo-random function $f$ (using some constant key $k$ and some initial value $v_0$). We do this by feeding the output block of the PRF back ...
181 views

### Does complicating a flawed algorithm make it secure?

It's a basic question I guess, but I don't know the answer and I don't think that anyone asked it. Suppose I built a system, it relies on MD5 for security, suddenly I read am article on how easy are ...
51 views

### Which precautions to protect against side-channel attacks on ARX ciphers?

In recent crypto there has been a trend to design ciphers using only the ARX set of instructions - i.e. additions (modulo $2^{32}$ or $2^{64}$), rotations (by a fixed constant) and XORs, examples ...
32 views

### MD5 Hash outputs not produced

Are there any hash outputs not produced by the MD5 hash function? I need to use it as a placeholder for an empty hash while comparing two hashes.
48 views

### How many Hashes to find a digest of 2^{n−k}?

Given an n-bit cryptographic hash function $H$, how many messages should we expect to hash before finding a message $x$ such that $H(x) < 2^{n−k}$ for some integer k? My take: Shouldn't it simply ...
177 views

### Prevent replay attack without storage

I am designing a set of low-power sensing motes. Each mote will communicate to a central base over RF. I want the mote to be able to authenticate itself with the base, and send its data without being ...
65 views

### Where can I get the correct and precise algorithms for elliptic curve cryptography?

I have been asked to implement cryptographic operations using elliptic curves. I would like to get precise algorithms for various processes like key generation, digital signature and verification. I ...
44 views

### If PRF is non invertible, why does Ctr-mode work?

I am currently taking Dan Boneh's Cryptography I course online. I have just finished the segment discussing the Cipher Block Chaining and Counter-Mode. I am having difficulty understanding why ...
19 views

### Does HTTP/2's opportunistic encryption potentially allow man-in-the-middle attacks? [migrated]

HTTP/2's opportunistic encryption of http URIs using TLS appears to allow the possibility of man-in-the-middle attacks. Is that true? RFC for opportunistic encryption in HTTP2. Here's HTTP/2's spec ...
67 views

### How can one protect against a Man In The Middle attack during key exchange without using certificates?

Besides using a certificate to defend against a man in the middle attack during a key exchange, what methods can be used?
78 views

### Private and public keys, how do they relate mathematically? [closed]

Assuming everyone here knows the basics of a public private key, then you know the keys are mathematically related. My question is, what is the math? I really would like an in detail algorithm of the ...
71 views

### Why is RSA encryption version 1.0 not specified in an RFC?

I saw that there are three RSA encryption versions, as follows: RSA encryption version 1.5 (RFC 2313) RSA cryptography specification version 2.0 (RFC 2347) RSA cryptography specification version 2.1 ...
29 views

### What is the DK function when generating an AES key for Kerberos 5?

I'm trying to understand RFC3962. So far I understood everything, except for the last part: generating the derived key from the PBKDF2 output. To generate an encryption key from a pass phrase and ...
17 views

### Proving for a single input vs several inputs. Is there any difference?

I am working on a new protocol for pattern matching. While defining the ideal functionality, it is possible to say: Alice sends $p$ and Bob sends $T$ to the ideal functionality. i.e. searching for ...
39 views

### Is it possible to have self-authenticated message?

Consider a text with $n$ words which $m$ words of it can be replaced with an equivalent word. Therefore we have $2^m$ different texts with the same meaning. For example "You are {so/very} ...
49 views

### Is a nonce considered 'secret' enough for HMAC?

We're implementing a mobile application which communicates with a web service, and on first install the user sends its deviceid to the web service (over TLS, unauthenticated at this point) - which ...
48 views

### Easy hash function collision

I'm designing a cryptography-breaking assignment for a college-level introductory security course, and I'm looking for a hash function which is reasonably easy (but not too easy) to generate ...
18 views

### TLS RSA Certificate with Elliptic Curve Negotiation

When I look at Google's Public Key in Firefox I get PKCS #1 SHA-256 With RSA Encryption Yet according to SSL Labs Google has EC 256 bits / SHA256withRSA and supports ...
18 views

### How do I check if the secret key polynomial of the ATV-FHE (NTRU based) scheme is invertible?

I want to implement the ATV-FHE scheme as described here https://eprint.iacr.org/2014/039.pdf. To generate the secret key polynomial I compute f = 2*u + 1 , with scheme parameters chosen such that ...
33 views

### 2DES COST ANALYSE

could you please help me to understand a question about 2DES? Thanks Q: 2DES(x) = DESK2 (DESK1 (x)) First, let us assume a pure key search without any memory usage. For this purpose, the ...
15 views

### Encrypted vs unencrypted digital signatures [duplicate]

Is there a difference in terms of security between An encrypted stream of bits obtained by encrypting a plaintext concatenated with it's signature $C = E_k(plaintext||\sigma)$ where $E$ is a ...
56 views

### Can we provide Authentication without key using hash?

We are doing research on the topic called "Authentication without key using hash". But it should not be using MAC and smart cards. We read many articles but we didn't figure it out. Is there any ...
68 views

### A “one time pad” can be thought of a Vigenere cipher with

A "One Time Pad" can be thought of a Vigenere cipher with... An infinitely long key A secure symmetric key Multiple ciphertext alphabets A columnar transposition I had this question come up ...
163 views

### Hash email address with a non-random salt for moderate security?

Crypto noob here. I have an application that has only moderate security requirements (internal use, limited audience). I want to send a unique url with a token in it to each user. If anyone has the ...
4k views

### Why can't I reverse a hash to a possible input?

I'm going to provide “proof” why a hash function can be reversed, and I hope you can tell my why I'm wrong So, a hash function can be implemented as a series of logic gates. All logic gates can be ...
32 views

### When would you use KP-ABE over CP-ABE?

When would you use KP-ABE over CP-ABE or vice versa? I started this question as I am having problems abstracting the pros and cons between KPABE and CPABE. This is not an assignment question. I have ...
19 views

### References for combining LFSRs with different lengths and taps?

I started learning streams ciphers with the use of LFSRs. Therefore, I tried to simulate what I am learning in a C sourcecode, which combines three registers and ...
29 views

### How to sign an Elliptic curve point using an ECC signature scheme

In Shnorr based ECC signature scheme, a message M is signed with the private key sk as s=sk.h(M,R)+k where R=k.P and P is a base point. If M is a point (x,y) \in E_p(a,b), how we can sign M in this ...
7 views

### With AES-GCM, can the encrypted and non-encrypted parts be hashed separately? [duplicate]

The hash function in AES-GCM takes encrypted and unencrypted parts. Can the two parts be provided in either order? I'm wondering whether there is any fun with $GF(2^{128})$ that can be done to ...
112 views

### Is it true that 7zip doesn't use any salt with its KDF?

This issue claims that 7zip does not use any salt with its key derivation function: https://github.com/magnumripper/JohnTheRipper/issues/1679 If that's true, wouldn't that mean you can crack multiple ...
30 views

### Modular arithmetics in diffie-hellman

Studying the basics of Diffie-Hellman key exchange, I'm stuck at a basic operation used in the end of the key exchange (where you show that both computations actually are the same). Can someone ...
13 views

### IV re-use for Salsa20 [duplicate]

Are their any specific requirements for the IV when using Salsa20? Is it for example allowed to re-use the same IV when encrypting with the same session key? Should the IV be random? etc I tried to ...
58 views

### Are there key collisions in AES-192, AES-256?

Suppose we have a single, fixed plaintext block $p$ of 128 bits. Call the set of all possible 128 bit blocks $B$. We could define fixed plaintext AES-128 as a function $f(k) \to B$ that takes a 128 ...
64 views

### Find a constant $C$ in $O(Cn^2)$?

I am writing a paper on RSA, and I am calculating some encryption running times. I have been told that the encryption running time is $O(n^2)$ where $n$ is the modulus. I have also been told that ...
47 views

### How many polynomials are used in Secure Multiparty Computation?

Secure Multiparty Computation based on Samir Secret sharing methods rely on Polynomials. Imagine corpus of data should be outsourced to bunch of untrusted servers for any computations. Now the data ...
62 views

### Private and Public Keys

I have a very basic understanding of encryption and the encapsulation process, but for the life of me I can't grasp how public keys and private keys work, how they're made, and how they're exchanged. ...
56 views

### Why does HKDF use HMAC(salt, key) instead of HMAC(key, salt)?

I've been looking over the HKDF specs (RFC 5869), and something I noticed is that in the key and salt are reversed: ...
116 views

10 views

### Public Key Unknown Encoding [migrated]

I have this public key: ...
25 views

### Number of Collisions Expected to have in a secure hash function [duplicate]

How many collisions would you expect to find if your hash function generates an n-bit output and you hashed m randomly selected messages? My Solution It follows from the birthday problem that to get ...
10 views

### Deriving key with OpenSCv14.0 [migrated]

I am trying to derive a secret key with OpenSC tool. I generated EC key with help of openssl through following command: ...
42 views

### Can several run of a semi-honest protocol be used to infer malicious security?

In the ideal world, $A$ sends several inputs $x_1,...,x_\lambda$ to the functionality and $B$ sends input $y$. Functionality sends $f(x_1,y),...,f(x_\lambda,y)$ to $A$ and nothing to $B$. Suppose ...
72 views

### What is the difference between “securely realizes” and “securely implements”?

In some security proofs it is stated that "a protocol securely realizes an ideal functionality" while in some others "a protocol securely implements an ideal functionality". Is there a meaningful ...
I have a physical unit, e.g. a resistor. I bias it with current and measure the voltage. Let us assume that the fluctuations ($\Delta V=V-<V>$) of this voltage signal are random. Now, $\Delta V$ ...