# All Questions

78 views

### Why not just encrypt the message and the hash of the message to achieve cryptographic integrity? [duplicate]

I've always seen MACs as a way to provide integrity and authentication. You would just append it to some message in clear. But this is clearly not the case when you're doing Encrypt Then Mac. When ...
76 views

### Definition of ciphertext security

If I got it right, chosen ciphertext security implies also CPA security. In other words, attacker can submit plaintexts to the challenger (along with ciphertexts). I do not understand why ...
47 views

### Why is it a quadratic equation?

In Groth-Sahai NIZK proof system, they have defined something called Quadratic Equation in $\mathbb{Z}_n$ as shown below. But, my idea of quadratic equation was a second order polynomial equation in a ...
276 views

### Practical Attack on RSA

Currently I am designing an RSA based application, and I am thinking of how long should the key be in order to be secure against attacks. I know that RSA 4096 bit key can be recovered using Sound ...
79 views

### Is RSA with SHA1 broken?

I am using CryptSignMessage to sign a string/file. Is using RSASha1 insecure? I know Sha1 is broken as a hashing algorithm, but does that also mean that using it for signing with RSA is broken?
71 views

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

Is there any (current) cryptosystem or digital signature or cryptographic primitive that uses the BBS PRG in order to generate its secret keys?
70 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$ ...
73 views

### how to represent message as an integer between $1$ and $n-1$ [closed]

I am trying to implement simple El-Gamal cryptosystem. And I can't understand how to represent message as an integer between $1$ and $n-1$. The only thing that comes to my mind is: if $n$ bit length ...
63 views

### What happens when cbc+hmac get a replay attack?

If it use AES-CBC and HMAC-SHA256 for message send online, and someone try to replay attack on this message. Can the attack be successful? what will be happen when attacking?
87 views

### Why do we need to compute message digest of a message first while signing it?

Why it is more efficient to compute a message digest of message and digitally sign it then, rather than sign the message directly?
118 views

### Is it possible to decrypt the entire message with one half of the key in this example?

In this scheme, a 256 bit key is split into two 128 bit sub-keys. Message blocks are 256 bits and are also split into two sub-blocks. Before encryption, each sub-block is xor'd with it's partner and ...
113 views

### Cracking secret key of a MD5 hash?

I have a MD5 hash which is obtained by hashing certain strings appended by a pipe character ( | ). (I know the values of these) A secret key is added as a suffix to this (I don't know the secret key). ...
302 views

### What is more secure, a ciphertext encrypted with AES-256 or encrypted with 3 different AES-128 keys?

Or better yet, is encrypting a block with 2 AES-128 keys just as secure as encrypting a block with 1 AES-256 key? By the way, I've only recently been learning cryptography stuff; I've made working ...
81 views

### Showing that $2^{N-1}\equiv1\pmod N$ when $N=2^p-1$ for prime $p$

I got this question on a previous exam and I got it wrong. I've gone back through it several times since then, but I can't seem to get it. I would really like to know how to do it, so if someone could ...
69 views

### How to figure out the size of the output of a cryptographic checksum function

There is such a putting in Bishop's Introduction to computer security, page 118 as following: Definition 8–2. A cryptographic checksum function (also called a strong hash function or a strong ...
66 views

### public key certificate on TLS/SSL

Currently I am working on a public key certificate. I got a question: Why is a public key certificate needed for TLS/SSL? Wouldn't TLS/SSL itself is enough? What is the role of the certificate?
123 views

### Security of chameleon hash functions

With the knowledge of the trapdoor, we are able to compute the same digest for differents messages. I've read that given two messages $m$, $m'$ and two numbers $r$, $r'$ such that ...
135 views

### Elliptic curve parameters

What's the meaning of 160 bit Curve in Elliptic curve ? or 192 or 224 or 256 and etc. And What is the standard for selecting this number of bit ? why they don't say 100 bit curve?
116 views

### Does brute force attack use the program that created the ciphertext?

I've read several articles about brute force cryptanalytic attacks, but none explicitly say what algorithm is being run for each attempt, nor what criteria is used to declare an attempt a success or a ...
61 views

### Is elliptic curve point multiplication semantically secure?

Is elliptic curve point multiplication semantically secure? I'd like to know if there are some sets of elliptic curve parameters (e.g. NIST curves) that are proved to be semantically secure or that ...
98 views

### Pollard's Rho - Constructing the random function

Suppose we are aiming to solve the discrete logarithm problem $\alpha^x=\beta$ in some cyclic group $G=<\alpha>$. Then we are looking for a (uniformly) random sequence of elements of the form ...
69 views

### How to calculate kinv from the given k value

I am implementing an ECDSA NIST test vectors verification application. The test vectors are taken from http://csrc.nist.gov/groups/STM/cavp/#09. One of the test vectors is given below: ...
121 views

### Perfectly secure shift cipher

Prove that if only one character is encrypted using a shift cipher, then the shift cipher is perfectly secure. I want to show that $P(P=p | C=c)=P(P=p)$. But I don't know how to relate. Can anyone ...
46 views

### Detect desynchronization in HOTP authentication [duplicate]

In HOTP authentication, is there a way for a system to detect that the token has been desynchronized? If so how does it know that the OTP was generated from a desynchronized (but valid) token and is ...
117 views

### Elliptic curve group over a prime finite field $F_p$

If $p$ is a big prime, and the elliptic curve $E$ is defined over $F_p$ by the equation $y^2=x^3+ax+b$ where $a,b\in F_p$. The point on $E/F_p$ together with the infinite point $\mathcal{O}$ form a ...
840 views

### In public key cryptography, how many keys are required for secure communication between n parties?

In public key cryptography, how many keys are required for secure communication between n parties? In my view the answer should be $n^2$. Reason: There are ‘$n$’ Parties. Every Party has One (1) ...
93 views

### How can I process data within a cloud securely?

I'm new to programming and I'm getting ready to design a proof of concept for an app that I'm thinking of building. Problem is I'm a complete noob to cryptography and need a little nudge to point me ...
52 views

### Is the product of two primes only factorisable by those two primes? [closed]

The question is as per the subject line. Does the fundamental theorem of arithmetic imply (prove?) that if I multiply two primes, then those two primes are the only factors of the product? I.e. 17 x ...
214 views

### How can we prove that two discrete logarithms are equal?

Suppose there are two elements $a = g^x$ and $b = h^x$, where $g$ and $h$ are generators in $Z^*_p$ and $p$ is a large prime. How can we prove that $a$ and $b$ have the same discrete logarithms with ...
113 views

### IV = Filename XOR CipherKey?

i want to encrypt transparently using Rijndael. So this is, what I thought of and I would like to have an opinion from "Experts" whether this will harm encryption strenght. I am using chunks of 1MB ...
152 views

### Thoughts on secure hashing and the “mds” algorithm

Almost a decade ago Raymond Chen blogged [1] about the "hash reset attack" cautioning developers to record the content length in addition to the message digest. Recently I came up with a variation on ...
622 views

### Decrypt AES-128 with key file but missing IV? [duplicate]

I want to decrypt a file that has been encrypted using AES-128 in CBC mode using OpenSSL. I got the “.key” file – which is 32 digits – but when I try to decrypt with OpenSSL, the program asks me for ...
170 views

### HKDF vs TLS PRF. Which of the one is better? [closed]

Which of the one (HKDF or TLS1.1+ PRF) is more secure and why?
187 views

### AES CBC MAC splicing attack

I'm trying to implement AES CBC MAC splicing attack in Python, the idea is: given a message M, its tag Tm (MAC(M) = T), a new message N and its tag Tn we build a message such as: M||N = (M1, ..., Mn, ...
102 views

### Is it possible to use structures other than finite fields?

I have some difficulties to understand why we are using finite fields in cryptography. Why do we use field? Why not ring or group? Is that really necessary that the field is finite? Why not real ...
1k views

### ECC key size and signature size

My understanding of ECDSA signature length is that it depends on the key size. So for instance, if a "prime256v1" is used, the signature length will be 64 because (n/8)*2 and for "secp384r1" it will ...
300 views

### Convert a number to sha-1

I have a task to find a the message for which the SHA-1 hash's last 11 symbols in hexadecimal presentation corresponds to an 11-digit number. I have been given the following example solution: For ...
107 views

### Explicit Key SHA-1

I'm reading “Collision-Resistant Hashing? Towards Making UOWHFs Practical” and in the Section 2 it says: Hash functions like MD5 or SHA-1 have no explicit key. But no notion of ...
461 views

### Diffie-Hellman Secret Exponent Size and Shared Secret Usage [closed]

I'm developing my own protocol and I'll use Diffie-Hellman to achieve PFS. It will work in this way: The symmetric encryption algorithm will be AES_256_CBC. The DH parameters will be: P: a 2048-bit ...
1k views

### If I have the unencrypted text and the encrypted text, can I calculate the key?

If I have the unencrypted text and the encrypted text, can I calculate the key? It seems logical based on my limited knowledge of encryption that I should be able to... but it also seems like too ...
116 views

Consider a secure modern block cipher like AES/Serpent/Twofish. I hear everyone say that the complexity is $2^{128}$ for a 128 block cipher. But isn't the weak link the actual hashed and salted ...
455 views

### Serpent block cipher : S0 to S7 functions unclear

I am presently implementing the serpent block cipher in C++ following the specifications. It's important to mention that I'm implementing the cipher in bitslice mode. You'll need the The full ...
593 views

### probability of N hash digits colliding

What is the probability of the first N hash digits colliding? for example i made a script that appends the first 5 digits of the file's sha1 hash to the name of the file. So will the probability of ...
117 views

### Distributed Asymmetric Key Decryption with threshold

Threshold decryption of public key encryption schemes allows the decryption key to be distributed among trustees. Then, to decrypt the cipher text it requires at least threshold t trustees to run the ...
210 views

### What does the cipher-text overhead means?

I have two questions here. What does the cipher-text overhead means? Why we were suggested not to encrypts the plain-text itself instead just encrypts only the key (i.e random number)
119 views

### What kind of adversary is a compromised party?

Imagine multiple parties executing a secure multiparty computation protocol to evaluate a function securely. Let Alice be one of the parties who is intended to get all the partial results and combine ...
286 views

### Recommended authenticated stream cipher for minimum overhead?

I'm running my TCP/IP protocol secured by encrypting each packet with AES128/CBC, bundling a SHA256 HMAC over that packet. This causes quite a bit of space overhead for small packets, so at first I ...
150 views

### The security of the AES secret itself

I am writing an application, running on a server, where multiple users access data from a database which is AES encrypted with a master secret. The master secret itself is initially randomly ...
I doing a project using ABE "Attribute-Based-Encryption" but i didn't understand what actually the function for $e(g,g)^xy$. Just tell what's the calculation need to perform here. I gone through no of ...