# All Questions

106 views

### Are LFSRs enough for this?

Consider the following experiment: Let there be a machine which runs (ie. continually clocks) an LFSR of size (ie. number of bits) $b$, having a button that, when pressed, extracts the next $t$ ...
864 views

### How to better generate large primes: sieving and then random picking or random picking and then checking?

I'm writing an RSA algorithm, and am wondering what is the best and/or usual way to choose the initial prime numbers (p and q). I know of two methods to achieve this, one based on a prime number ...
121 views

### Shannon confusion and diffusion concept

I read the document(not the whole document) from Shannon where he speaks about the concepts of confusion and diffusion. I read in many places(not in the document but around the internet) that ...
99 views

### Implementation and Testing of SRP-6a

I have been wracking my brain trying to develop a functioning implementation of SRP-6a in Python to use with a 3rd-party API that claims to use SRP-6a with $N=$ 2048-bit prime and generator of $2$. ...
1k views

### How does TLS_FALLBACK_SCSV help?

After reading through https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-0, I could understand that this option is recommened for use when one has legacy SSL Servers which only support SSLv3. ...
38 views

### Does the following linear equation hold in bilinear pairings:

Does the following hold in bilinear pairings: $$e(g^{a_1x_1}g^{a_2x_2},g^{c_1}g^{c_2})=e(g^{x_1+x_2},g^{a_1a_2(c_1+c_2)})$$
85 views

### Comparing Files: Is it better to use multiple hash algorithms or just one?

I'm looking to compare (for byte-for-byte equality) two binary files. I already have the process down: Check for existence etc. Compare file lengths Use a hash or CRC of a sort (right now I use ...
91 views

### AES: Guess Password using the unencrypted text?

I am using the same password for some encrypted files currently (I know this is bad practice, though), and I wonder whether an attacker could decrypt if one decrypted file fell into his hands.
71 views

### Is there any existing cipher capable of scaling from a 1 bit key up to a one-time-pad?

We have ciphers that handle small amounts of entropy, such as a 256 bit key for AES; and we have one time pads for enciphering 1:1 entropy, such as a 1GB key for a 1GB file if you could ever harvest ...
65 views

I'm creating a prototype for a messaging queue with some custom logic (can't re-use any existing solution). One requirement is to have all messages encrypted. There are three classes of nodes ...
39 views

### Use of ElGamal encryption for signature generation

If RSA (textbook RSA that is) generates a digital signature by using the sender's private key, couldn't any cryptosystem (the only two that come to mind are RSA and ElGamal) capable of asymmetric ...
30 views

### Side channel vulnerabilities in SW RSA implementations? [closed]

I would like to know a list of practical side channel attacks with references. These attacks should work on SW implementations and I do not consider attacks that require physical access such as power ...
112 views

### Adding tweak to a block cipher

I know there are XEX, XTS and other ways to add tweak to block cipher without modifying cipher itself. However they are quite slow and/or complex. If we assume we have a secure block cipher round ...
49 views

### How would I write my own asymmetric encryption algorithm (not RSA, DES etc)? [closed]

I am looking for some advise on how to go about writing my own asymmetric encryption algorithm. It does not by any means need to be as secure as the commercially available algorithms (RSA etc), it is ...
100 views

### Implementing a web app where the server cannot decrypt its own data?

I'm a cryptography novice, but I think that the world needs to move towards an "encrypt everything" mentality as much as possible. As a result, I've been thinking a lot about ways to build a web app ...
52 views

### Output of a Feistel network with all “0” round function

What is the output of an r-round Feistel network when the input is $(L_0, R_0)$ and each round function outputs all 0s, regardless of the input?
30 views

### How to encrypt letters less than block n using Hill Cipher

I am learning about Hill Cipher and know that it is a block cipher where each block of n letters (considered as an n-component vector) is multiplied by an invertible n × n matrix, again modulus 26. ...
41 views

### Need help solving a shift cipher problem?

A three letter alphabet {a, b, c} has probabilities p(a) = .5 and p(b) = p(c) = .25. A shift cipher is applied to pairs of letters. More precisely: plaintexts consist of two-letter sequences of ...
58 views

### Is it safe to derive a password from a signature provided by ssh-agent?

I'd like to use a password-based system on a remote host (accessed via SSH) without having to copy-and-paste the password and without storing it on disk. Using the system with some other form of ...
45 views

### Create collision examples with MD5 hash with salt

I'm using the following lines to create a hashed string String source = String.format(%s %s %s", salt, firstPart, secondPart); byte[] bytes = md5(source); ...
48 views

### Key management protocol for end-to-end security on Advanced Metering Infrastructure

I am currently working on a research on end-to-end security implementation for Advanced Metering Infrastructure (AMI). Pardon me if I a bit off topic or not asking the right question as I am ...
56 views

### Can Diffie-Hellman be scaled up or force-multiplied?

I'm not too familiar with the math involved with the exchange of keys, I've read it over several times, but math isn't my strong point. My understanding is that smart people are hard at work to ...
55 views

### Generic group model: use of polynomials in the proof of the master theorem

I've been looking at the paper of Boneh, Boyen, Goh Hierarchical Identity Based Encryption with Constant Size Ciphertext which contains a general theorem (Theorem A.2) about the advantage of an ...
43 views

### How to calculate the entropy of passwords? [duplicate]

Here is a cartoon about password entropy. http://xkcd.com/936/ I dont quite understand how the entropy is calculated in the cartoon assuming they are calculate correctly. But in general, I dont have ...
40 views

### Does NSS fully implement PKCS 11?

I am looking towards using NSS in a Linux application that makes use of a TPM (HSM). So, I am checking the support of PKCS 11 in NSS, at least for the management of Elliptic Curve keys, signature with ...
45 views

### ECC encryption with Miracle Library in C [closed]

I want to use miracle library in C for simulate some Algorithm. these algorithms are ECC encryption in different coordinate. I have two algorithms that should give me the same output . But I don't ...
2k views

### What is the recommended replacement for MD5?

Since MD5 is broken for purposes of security, what hash should I be using now for secure applications?
65 views

### RSA-KEM construction

"Create a random key for CCPA2 scheme, encrypt m, send it along with a PK encryption of the symmetric key. " Say in the process, the KDF is HMAC, then: get a random key (128-bit) C1 = encrypt ...
44 views

### How to use the key from a Diffie Hellman exchange? [closed]

I watched a YouTube video about Diffie-Hellman called "Diffie-Hellman Key Exchange", and it said after doing some modulo operations with the public modulus and generator and the random private ...
60 views

### Is it possible to 'fake' time for TOTP? (Time-based One-time Password)

TOTP (Time-based One-Time Password) Algorithm is used in Two factor authentication. I understand the algorithm and that current time is used as a variable to generate a token. Wiki page for reference: ...
39 views

### online Vickrey auction using remote coin flip

Is there any published work on implementing a online auction, which uses "remote coin flip" to prevent auctioneer cheating when choosing winner and bid value? Is there any possible way to use remote ...
41 views

### Forward Secrecy with pseudorandom functions

Let $H_1$, $H_2$ be keyed hash functions (e.g. $H_i(x) = SHA_{256}(s_i||x)$ for pseudorandom $s_1$, $s_2$). Let $s_n = H_1^k(s_0)$, $k_n = H_2(s_n)$, where $s_0$ is a secret (pseudorandomly chosen ...
44 views

### SpongeWrap without padding and frame bit

Assuming all inputs are same length as rate except last can be shorter. Is it necessary to pad every input (not just last) to sponge for authenticated encryption to be secure? Is this just, because ...
72 views

### How do RSA and ElGamal key sizes compare?

I have a rather silly question regarding the comparison of RSA with ElGamal over integers. If you want to compare their performance in the same level of security, does the modulus of both of them need ...
2k views

### How does order-preserving encryption work?

Order-preserving encryption (OPE) is, apparently, a method of encrypting data so that it's possible to make efficient inequality comparisons on the encrypted items without decrypting them. I've been ...
264 views

69 views

### Rijndael performance

I have written the routines Rijndael 128-Bit ENC/DEC and KeyExpand. In bit sliced SSE2, and from his OPS would like to know its performance. The results are as follows: ENC: SubBytes&Shiftrows ...
289 views

### How does MD5 process text which is shorter than 512 bits

MD5 processes a 512-bit block and produces a 128-bit (16 byte) message digest often expressed as 32-digit hexadecimal value For example if I hash the word "how" using MD5 , I get the following hash ...
141 views

### How dead is braid based cryptography

Braid groups has drawn the attention of cryptographers for a few years, as a promising platform for post-quantum cryptographic protocols. The security of the proposed schemes mostly relied on ...