# All Questions

121 views

### reduces the coefficients of a modulo 3 on NTRU

i'm still don't understand about 'reduces the coefficients of a modulo 3' on NTRU tutorial $a = f*e = 3 - 7X - 10X^2 - 11X^3 + 10X^4 + 7X^5 + 6X^6 + 7X^7 + 5X^8 - 3X^9 -7X^{10} \pmod{32}.$ Note ...
279 views

### How to efficiently generate a stream of independent, but biased random bits?

Usually, in cryptography, one is interested in debiasing a stream of independent (true) random bits, and several algorithms exist to do this. What about the converse? Let's assume I have a stream of ...
1k views

### HRNG for One Time Pad

I have just advanced to the last grade of high school (in Denmark). In this year, we all get to do one big project, where we can build/invent/create whatever we want to "solve a problem". As I study ...
374 views

### Comparison: complexity measures vs. security

Assume that you want to compare several cryptographic primitives (say, encryption schemes), and choose one. You need to consider several complexity measures, such as the key length, encryption time, ...
460 views

### File encryption with one keypair?

I'm working on a program that uses an ECC keypair in a (password protected) PKCS12 file (.pfx) to encrypt files. I like this method because I think it will be higher security (using ECDH to negotiate ...
445 views

### How to compute the dot product on encrypted values?

Is there a practical homomorphic encryption scheme that can give reasonable execution time results in computing a dot product: $$a_1*b_1 + a_2*b_2 +a_3*b_3 +\ldots+ a_n*b_n$$ I imagine the scheme will ...
274 views

### Could a very long password theoretically eliminate the need for a slow hash?

Before I provide details, I want to clarify that I am not looking to implement this practically, but I'm only asking to get a better understanding. The way I currently understand it, we use slow ...
128 views

### Key Exchange and anonymity issue

If Alice (sender) sends a private message embedded with public key of the Bob(recipient) through onion network, so in this key exchange, does Bob remains anonymous to Alice as Alice knows about the ...
123 views

### RSA Certificate Owner and Issuer line meanings?

Apologies if this question is not in the right place. I've recently been looking through some RSA certificates ( specifically, Android apk .rsa files) and I'm having trouble deciphering the one and ...
247 views

### How large should a Diffie-Hellman p be if the messages are encrypted?

How large should the prime $p$ and generator $g$ values be in a Diffie-Hellman handshake if the messages are encrypted. If the key that encrypted the Diffie-Hellman messages becomes compromised, ...
260 views

### Encrypting and Decrypting a 19-digits long BigInteger

How can I take a maximum 19-digits long BigInteger and encrypt it with the following rules: The result must be based on digits and lower-case English letters ...
2k views

### How does the rand() function in C work? [closed]

I want to know how rand() works (even when I don't provide any seed how it produces PRNs?) thanks!
1k views

### Brute forcing an HMAC

Given current technology such as GPUs and GPU cracking software I was wondering if anyone has an idea on how long it would take to brute force the key used to derive an HMAC?
152 views

### How comparable is OFB to a one-time pad?

This is a rather trivial question, I just want to see if I get the concept right. In OFB you generate a pseudorandom stream based on some nonce, and you XOR that with the message to get the ...
5k views

### What makes a hash function good for password hashing?

Using a cryptographic hash to store e.g. passwords in a database is considered good practice (as opposed to storing them plaintext), but is subject to attacks on said cryptographic hash, assuming the ...
27 views

### Encryption with Deduplication [duplicate]

Suppose I have a file server running ZFS with file deduplication enabled, and I have two users that are sharing files: Alice and Carol. If Alice uploads huge_file.tgz to her www/ directory, and Carol ...
148 views

### Does Linear Cramer-Shoup have pseudo-random ciphertexts?

"Linear Cramer-Shoup" is defined on pages 4 and 5 of $\:$ eprint.iacr.org/2007/074.pdf . Are the ciphertexts in Linear Cramer-Shoup computationally indistinguishable from uniform under a ...
1k views

### Where to store the private key and the public key in a communication protocol

I want to create a simple secured connection protocol over TCP/IP. I just want to connect from my mobile device to a server securely. Firstly I thought to use an SSL connection, but I changed my ...
164 views

### Selecting a large NUMS Safe prime

Suppose I want to use the following simple hash function. For a mesage $m$, take some public $a$ and prime $p$ and raise $a^m \bmod p$ (never mind the computational expense of this operation). This ...
326 views

### When confusion is applied during encryption?

I know confusion is used in cryptography to make it more difficult to identify any relationship between the ciphertext and the symmetric key. I want to know when the confusion is applied during ...
287 views

### computing inverses in truncated polynomial rings manually for NTRU encryption [duplicate]

Can someone explain how to find inverses in truncated polynomial rings manually (i.e. on pen and paper)? As an example from the tutorial: Example. Take $N=7$, $q=11$, $a=3+2X^2-3X^4+X^6$. The ...
686 views

### Is this encryption algorithm build from MD5 secure?

I'm being asked to use an encryption algorithm in my code, and besides the fact that I'm sure there will be implementation faults that lead to vulnerabilities, I also have concerns about the algorithm ...
81 views

### Can a LIRA system work with cjdns or other decentralized meshnets?

LIRA (Lightweight Incentivized Routing for Anonymity) is a scheme to incentivize participants in Tor to contribute resources, in particular bandwidth. The paper talks about it being used for Tor. Can ...
941 views

### BCrypt vs Key Stretching MD5

Ars technica posted an article about the latest in cyber warfare from the stuxnet crew. They key stretched MD5 by iterating it 10,000 times. It seems to be effective at handicapping HashCat's gpu ...
763 views

### Can I use a key-derivation-function as the hash function H in SRP?

In the Secure Remote Password Protocol, the verifier must be stored on the server. In the case of a server compromise, an attacker could obtain these verifiers. If nobody reused passwords, this ...
271 views

### Solving congruences using PARI

I'm having trouble finding info in the docs about how to solve a system of congruences. The closest I can find is 'matsolvemod' in here: ...
526 views

### Strong encryption done by hand [duplicate]

One of the distinguishing features of a good encryption algorithm, is that it is easy to encrypt, and hard to crack. Are there any that are easy enough for average folk to remember, and calculate by ...
356 views

### Encrypting many small messages (log-lines)

What would be the best way of encrypting small mesasages to be stored in encrypted form? (This sounds like somthing a textbook would cover, but I haven't found any references). Let's say I have many ...
197 views

### Is there an efficient way to hide the encrypted plaintext length with a block cipher?

In block cipher modes of operation for encryption on input of a plaintext of $N$ blocks (We assume that the input size is always a multiple of the blockcipher mode: $N·16$ bytes) the size of the ...
246 views

### Zero-Knowledge Challenge-Responce Protocol

Good day to everyone. I am trying to implement an e voting system (just for reference -it is not important though-it is described at the Internet Voting Protocol Based on Improved Implicit Security ...
487 views

### Partial decryption of large file in AES-GCM (or other modes)?

Lets assume a 4gig file that is internally made of 1 million pages of 4k bytes each (page). the file was originally AES-GCM encrypted these pages (or entire file) lives across the internet i.e. ...
2k views

### Would a “Triple AES” (in the sense of how Triple Des works) serve for a dramatic increase in safety?

The system requires to be as paranoid as possible regarding security. One of the few contemplated changes to the current design is to use multiple encryption. First proposal was to use Serpent on top ...
261 views

### Method and explanation for calculating difference in speed between DES and RSA

Our assignment asks us to convert an RSA speed in bytes per second to a DES speed in bytes per second. Our professor's treatment of this ("RSA is 100 times slower than DES") seems insufficient. Could ...
296 views

### Is this method for exchanging private key using RSA sound?

Bob know's Alice's public key, and he wants to make sure he's connecting to the one which has that key. Furthermore, Alice wants to verify when she gets a connection from Bob who'll give his public ...
1k views

### Is SHA-256 secure as a CTR block cipher?

Generate a 256-bit random nonce. XOR it with a 256-bit reusable symmetric key. This is x. We represent numbers in simple binary instead of a counting function. ...
98 views

### How difficult is it to check if a group element is in a sub group?

I am just curious. We have a group $G$ and its subgroup $H$ with a generator element $h \in H$. How difficult is it to check for $x \in G$ that $x \in \langle h \rangle$? Is there a better way than ...
344 views

### What are some different cryptography methods?

Some of the most effective cryptography methods and algorithms are based of factoring large prime numbers (e.g. RSA). I'm curious whether there are some other cryptography methods. Somethings that is ...
604 views

### Finding roots in $\mathbb{Z}_p$

Is there an efficient way (algorihtm) to compute the solutions of the congruence $x^n\equiv a \pmod p$? $n\in \mathbb{N}$ $a\in\mathbb{Z}_p$ $p$ is a large prime number Note that: By efficient I ...
644 views

### XOR cipher for encrypting compiled C code

I'm exploring ways of encrypting Intel hex files we send to customers for flashing onto an embedded device. The embedded processor itself has a built-in mechanism that prevents anyone from reading the ...
67 views

### Strength of Combining Hash functions [duplicate]

If I combine two hash functions, what will the impact on the strength of the resulting function. If I combine in following way: H1*H2 (multiply) H1 + H2 (concat) H1 Xor H2 H1 (H2) EDIT: Lets say H1 ...
796 views

### Should the secret key of Shamir's secret-sharing algorithm be interpreted byte by byte?

Should the secret message of Shamir's secret-sharing algorithm be interpreted and processed byte by byte? Interpreting it byte by byte makes it easier to process, but in case one of the shareholders ...
58 views

### Equivalents to a physical hat+shaking?

I would like a multiparty protocol, secure in the honest-but-curious model at least, but hopefully other situations as well, that can do the following: every party among $\{P_1, P_2, \ldots P_n\}$ ...
335 views

### Modulus for elliptic curve point multiplication

I want to implement a point multiplication ($k \cdot P$) operation on FPGA. I have a BN curve $y^2=x^3+2$, and a scalar value $k$. The $x$ and $y$ coordinates of point $P$ are of 256 bits. In the ...
194 views

### Exponentiation In PBC library

I need to compute a function $h^l$, where h is an element of G2 and l is a rational number. How can this be done using the PBC library? I have converted the h to ...
256 views

### One-time pad and perfect secrecy properties

I have a homework problem: Explain how to find $m_{0}$ and $c$ such that $P[c=c': k \leftarrow K, c' \leftarrow E(k, m_{0})] > 0$ where P is probability and k is chosen uniformly. I do not know ...
315 views

### How are Elliptic Curve Cryptography and Pairing Based Cryptography related?

I have been doing a project that uses the PBC library developed by Ben Lynn. But I am still not clear on how PBC is related to ECC. I know that this is a site for complex crypto QA, but I did not know ...
513 views

### Possibility of factorisation of rsa modulus due to vulnerability in java implementation code

Below is my implementation of the RSA algorithm. Actually I'm choosing the private key (d) instead of public key (e) and computing the public key.It is working fine but I want to know if this is a ...
2k views

### is AES secure for java application licensing

I have to license a java application and want to code a quick implementation, the scheme I came up with is: 1) The Application calculates a string X which we assume to be the md5 sum of the ...
In the Paillier cryptosystem [1] the encryption of $m \in \mathbb{Z}_N$ with randomness $r \in \mathbb{Z}_n^*$ is $c = g^m r^n \bmod{n^2}$. The additive-homomorphic property of the system shows that ...