3
votes
0answers
46 views

Calculating probability of finding collisions in an invertible hash function

Assuming we have an invertible hash function H that takes inputs of size 2n and outputs hashes of size n, I use the following algorithm to find collisions: Choose a random M as input. Compute its ...
4
votes
1answer
67 views

Number of Sbox in a Cipher

Camellia has 4 SBOX and so does the TwoFish(key dependent 4 Sboxes). Where as AES uses only one. Would it have made AES more secure if AES had 4 or more SBOX too? Does using more Sbox with similar ...
1
vote
1answer
33 views

Camellia Key Schedule

Camellia is a widely used International standard now. Its Key Schedule seems to be too simple as compared other famous Ciphers like Twofish and CAST-256. What are the per-requisites for the key-...
4
votes
0answers
57 views

Numeric base conversion in cryptosystems?

I have been wondering if numeric base conversion has ever found an application in cryptography. By base conversion, an example that is probably familiar is Base64 encoding. This is an example of ...
1
vote
1answer
39 views

Why Rabin fingerprints assumes data is prefixed with a “1” bit?

(I know that a Rabin fingerprint is not a cryptographic hash, sorry in advance if my question is considered out of topic) In the paper Some applications of Rabin's fingerprinting method, it is ...
0
votes
0answers
15 views

Is normal to take wrong values of the polynomial for given x while applying Horner's rule

I want to evaluate the polynomial $a_0+a_1x+a_2x^2+...a_nx^n$ using Horner's evaluation due to i want to speed up my performance of application written in Java. The problem is that sometimes it gives ...
0
votes
1answer
17 views

How many field operations are needed when you compute kG in elliptic curves with a multiple additions or the double-ans-add-algorithm?

For an assignment, we have to calculate how many field computations are needed to calculate kG in an elliptic curve. They want us to show this for two different ways of calculating kG. The first way: ...
3
votes
1answer
75 views

Combining secure hashes with insecure hashes?

Assuming I'm a bank which seeks for secure hash functions to use in the process of signing on digital contents. I'd like to explain / prove why using each one of the following hash functions might ...
0
votes
0answers
19 views

How to generate an El Gamal signature without knowing the private key x?

Let $x$ be the private key. Let $k$ be a random generated number $< p-1$, with $p$ the large prime. Let $g$ be the generator of $p$ the large prime. Let $r$ be the equality $r=g^k$ Let $m_e$ be an ...
0
votes
0answers
37 views

Message length for aes 256 in ctr, ecb and cbc mode

I want to encrypt a message that have values between 0 and 50. So message have maxim 1 byte. Is possible to encrypt with aes256 in ctr, ecb and cbc mode, messages from 1 byte, not necessary 32 bytes? ...
0
votes
1answer
23 views

X509 Cert exploit CA check

Assumptions Let's theoretically assume that a browser skips the check that a certificate it receives belongs to the stated CA (that's an exercise). How could I exploit this in order to impersonate ...
3
votes
1answer
64 views

Insecure third party connection

My organization processes some PII data and shares it with an outbound connection (outflow only) that is a third party. The data transfer transactions occur without human intervention. That outbound ...
4
votes
0answers
43 views

How to forge signatures in the Schnorr scheme if $r=g^k$ is eliminated?

I need some help to demonstrate how to forge signatures in the Schnorr scheme if I eliminate the random string $r=g^k$ used in the hash – using $H(M)$ instead of $H(M||r)$. How would one be able to ...
1
vote
0answers
39 views

Issue Factorization Quadratic Sieve

Good evening, I'm about to write my own quadratic sieve implementation in C using GMP library for large numbers. I'm facing an issue while attempting to do the last factorization step for the number: ...
0
votes
1answer
19 views

Digital signature with collision

Let's assume a digital signature scheme such that there's a probability of 0.2 for two random messages to have the same signature. How can I exploit this sheme? I'm having difficulties in finding an ...
2
votes
0answers
8 views

How to decrypt SSL data on a considered-to-be-compromised host? [closed]

I have a package which I want to encrypt on my machine and send it to another remote machine. If I use asymmetric encryption, I must have the private key on the remote side. However, I don't trust the ...
0
votes
1answer
54 views

Why is it better to have the private key as the multiplicative inverse mod phi(n) in RSA?

I'm studying the RSA algorithm and the theory says to select $d$ to be the multiplicative inverse of. $$ e \mod \phi(n) $$ If we take this approach I know that it is important that $e$ and $\phi(...
3
votes
2answers
69 views

Chosen-Message-Attack RSA-Signature

I know that because of the multplicative property of RSA $s =(s_1s_2) \bmod n = (m_1m_2)^d \bmod n$ If Oscar wants to sign now an own message $m$ he chooses another message $m_1$ with $\gcd(m_1,n)=...
1
vote
1answer
49 views

How to brute force sqlcipher encrypted file with MD5 hash of a 7 bit key?

I have a database file that is encrypted using sqlcipher and MD5 hash. Sqlcipher to my understanding provides 256 bit AES encryption. The key is 7 bits long. How do I brute force it?
-3
votes
1answer
44 views

Is SHA-256 safe and difficult to crack? [duplicate]

I am trying to crack a SHA-256 hash but I am not sure how to approach this in an efficient way. The following is known of the original non-hashed content: 64 characters long only consists 0-9 and a-...
0
votes
1answer
20 views

Is it possible to extract the decryption key from a locked android device

Is it possible to extract the decryption key from a FDE android device while the screen is locked but the phone is powered on. Is the data only safe when the phone is off ?
3
votes
1answer
48 views

El Gamal special construction

The algorithm: I have to determine if the following algorithm is secure: $p,q \in \mathbb{P}$ and $N = p \cdot q$ $e \in [2, N - 1]$ such that $\gcd(e, N) = 1$ $r_1, r_2$ are random numbers ...
0
votes
1answer
44 views

If I encrypt data with two different ECC Private keys, how secure is the result?

I'm wondering whether encrypting data with two different 256-bit ECC keys will result in a more secure encryption (minimum 384 bit equivalent) or will result in data that's effectively encrypted with ...
3
votes
1answer
45 views

Not-So-Simple Substitution Cipher?

The first go-to weakness when talking about substitution ciphers is frequency analysis. It assumes that there's a simple 1 to 1 character mapping between the plain text and the cipher text. Could a ...
0
votes
0answers
6 views

Key Management - general question [migrated]

I have a little question regarding the wonderful topic of "Key Management". Let's imagine I would use a service like AWS Key Management. According to their API documentation one can easily decrypt a ...
2
votes
1answer
72 views

Exponential cipher theory misunderstanding

Say I pick modulus $m=2633$ and key $e=13$ My private key $d$ is $13$ inverse in $\bmod 2632$ which I need to compute $(e,m)$ is my public key that anyone can use to encrypt message for me and then ...
2
votes
0answers
28 views

How to determine how good our generator of random numbers is [duplicate]

I am using SecureRandom class in java with default constructor and after i run it four times and each times i will take back 4 "supposed highly secured random numbers" . First run : -35 -43 -127 12 ...
1
vote
1answer
25 views

Size of Pre-Master Secret?

I am implementing TLS 1.2 and using cipher ECDHE_RSA_WITH_AES_128_GCM_SHA256 According to RFC 5346 Section 8.1 length of premaster secret will vary depending on key exchange method. So, what is the ...
2
votes
3answers
56 views

Why the exponent is a power of 2 in Ring-LWE?

I was reading some papers on Ring-LWE. I found almost all of them talk to choose the polynomial modulo $x^n+1$ where $n$ is a power of $2$. I did not understand why this condition is necessary?
0
votes
0answers
15 views

What is the right strategy for me to develop a paid public wifi? [migrated]

I want to establish a paid public WiFi system. Here is my model of how it will work: I will install a public WiFi in my apartment. Using the WiFi system is paid but, voluntary. Those who pay me a ...
2
votes
1answer
64 views

multi key encryption

Is there an algorithm which allows using multiple keys for decryption? I had this scenario in mind: think about being a boss of a corperation which has an encrypted data base with loads of secret ...
9
votes
2answers
242 views

In the Quadratic Sieve, why restrict the factor base?

In the Quadratic Sieve, when factoring a number $N$, many descriptions and most implementations select as the factor base the set of small primes $p_j$ less than some bound $B$ restricted to having ...
3
votes
2answers
33 views

X509 certificate

I am studying the X509 certificate structure and here is an OpenSSL configuration file for generating the certificate. ("sth" just mean the actual string is removed) ...
-2
votes
1answer
46 views

Range of a number notation

If a number is chosen from $[-n,n]$ is that the same as being chosen from $\mathbb{Z}_n$? Since the operations are modular, what meaning does the negative part of the range have?
2
votes
2answers
64 views

Is this approach able to protect against padding oracle attacks?

I know that a protection against the padding oracle attack is to encrypt-then-mac. This is to avoid trying to decrypt a modified ciphertext, and leak information about padding errors. Suppose that we ...
0
votes
0answers
34 views

RC4 using a key without nonce's or IV's [duplicate]

I'm researching RC4 and I am trying to recreate a condition where RC4 is crackable. However I can't quite find the article/resource I need to find the weakness for an implementation like this (python):...
3
votes
2answers
47 views

How do I pick variable length passwords uniformly at random?

How do I pick passwords uniformly at random when given a min and max length? It seems that if I first pick a random length, then choose random characters, this procedure will choose shorter length ...
1
vote
1answer
81 views

Sieving the sequence $x^2-n$ to recognize b-smooth numbers

I am currently programming the quadratic sieve and have several literature books / papers and will take an example out of [1] for my question: [1] An Introduction to Mathemtaical Cryptography by J. ...
0
votes
0answers
28 views

Why $p-1$ needs large factors in discrete logarithm?

In discrete logarithm over cyclic group $\Bbb Z_p$ where $p$ is a prime or $p=q^n$ a prime power it is desired that $p-1$ needs to have large factors except for $2$. What is the consequence even if ...
0
votes
0answers
14 views

Why is a-symmetric so much harder to compute and why does it need such big keys? [duplicate]

I read that a symmetric encryption requires a way bigger key size to have the same security as symmetric encryption with smaller keys. But why is this, and why is it so much harder to compute?
34
votes
5answers
6k views

In RSA, how does the CPU deal with this huge modulus (8192 bits)?

Whilst I understand how the RSA algorithm works, I don't understand how the CPU operates when it needs to use the mod function with a huge number $n$, for example. ...
1
vote
1answer
85 views

Fully Homomorphic Encryption over the Integers with Shorter Public Keys [closed]

I want to implement Homomorphic scheme from the paper Fully Homomorphic Encryption over the Integers with Shorter Public Keys. I successfully implemented key generation by taking $\lambda = 2, \beta =...
1
vote
1answer
67 views

Scalar Multiplication for Elliptic Curve

Let $\mathbb{E}$ be the elliptic curve $y^2 = x^3 + 6x \text{ mod } 11$ and consider the point $P = (2, 3)$ on it. How do I compute $3P$? I have been able to figure out what $2P$ is, $2P = (5,10)$. ...
2
votes
1answer
86 views

Do I need to use a CSPRNG when creating salts for user accounts?

I'm not sure about the need of using CSPRNG to create salts for each user account. I found “Cryptographically Secure Pseudo-Random Number Generator in Qt/C++ (Cross platform)” (at StackOverflow) with ...
3
votes
0answers
54 views

How does the Number Field Sieve find the target number for Diffie-Hellman?

I have read some papers relating to the Number Field Sieve, but I could not figure out how this algorithm helps in Logjam, or even what is meant by the number field. What is this? What is meant by ...
3
votes
1answer
67 views

Can I change an encryption key used without decrypting first

I'm looking to solve for a little challenge I have in regards to changing the encryption on a message with asymmetric keys. I'd love to be able to swap the encryption to a different key in memory and ...
2
votes
2answers
33 views

How to find the keyword of the Playfair text knowing/not knowing the plaintext and having decrypted text?

I know how the Playfair cipher works. I would like to know how can I find the keyword of the play fair cipher in two cases: 1) knowing the plaintext 2) not knowing the plaintext? Some examples: <...
4
votes
1answer
57 views

Is this a good choice of a digital signature scheme?

This is a concrete instantiation of Rabin-Williams signatures. Specifically: The private key is 2 primes $p, q$. The public key is their product $N = pq$ and is approximately 3072 bits long. the ...
2
votes
1answer
38 views

Is this hash function almost XOR universal?

Consider this hash function: The key $K$ is $2^n$ bits. The message $M$ is divided into $2^n$ bit blocks. Arithmetic is performed modulo $2^{n+1}$. The hash is defined by: $ H_0 = 1 $. $H_{i+1} = ...
3
votes
1answer
25 views

Encrypt-then-MAC when encrypting data in multiple blocks

Given a stream cipher such as ChaCha20 and a MAC such as Poly1305, how do we handle data that comes in chunks in the encrypt-then-MAC scheme ? For example, the plaintext is 530 bytes long. We read ...

15 30 50 per page