# All Questions

74 views

### Base64 for a hash algorithm [closed]

May be a silly question, but I am really curious. If a hash algorithm uses Base64 in the process of hashing a string for example, it is still considered a hash algorithm, even though it uses an ...
104 views

### What is the most secure key expansion routine?

I am looking at G now, but is there a better, (in terms of security and speed), means by which a byte array can be expanded that doesn't involve another cipher, just a simple algorithm? I need to ...
61 views

### Cracking an appliance's network protocol

I'm trying to crack my thermostat's network protocol. I've captured several rounds of network traffic and here is what I've got to work with. Communicating via HTTP POST The POST data is JSON ...
114 views

### Why is Rijndael key length restricted?

Why is Rijndael restricted to key length in {128, 160, 192, 224, 256} bits (and not larger)? The algorithm looks to me like it would support an arbitrary-sized key (multiple of 32). The rounds ...
155 views

### Is it possible to generate a secure permutation F over 32-bit integers even if F(0) … F(n) is public knowledge?

I'm currently interested in the problem of generating random-looking URLs from sequential database IDs, like how they do it in link shorteners. One way to do this is to encrypt the sequential database ...
58 views

### Is using SHA256 to extract entropy from a p-rand nonce a good way to create keying material?

Using $SHA256(N)$, where $N$ is 64 bytes of output from the Microsoft Windows CryptGenRandom function. Are there any known vulnerabilities with using this method to ...
221 views

### Elliptic curves in java

I am writing you because I want to implement the DPS signature with elliptic curves in Java. I found this library http://docs.oracle.com/javase/7/docs/api/java/security/spec/package-summary.html which ...
35 views

### ECIES: Purpose of optional shared information?

According to Wikipedia the ECIES algorithm has two optional shared information $S_1$ and $S_2$. They are used as follows: Generate a random shared secret $Z$ according to ECIES, which will never be ...
214 views

### Would xoring 2 independant AES CTRs to produce p-rand introduce vulnerabilities?

Assuming $$AES_{k_1}(C_1) \oplus AES_{k_2}(C_2)$$ where AES is used in CTR mode, $C$ is a 128 bit incrementing counter, keys and counters for both transforms are random as well as unique, and the ...
65 views

### ECIES: Purpose of MAC?

Assumptions: $A$ wants to communicate with $B$ $A$ knows a public key $P_B$ which is trusted by a third party and belongs to $B$ $A$ knows the address of someone who pretends to be $B$ $A$ wants ...
147 views

### Is this correct way to generate stream cipher using AES CTR mode?

We are implementing searchable encryption techniques proposed by Song et al in Java for a paper[1]. The schemes need a Stream Cipher for achieving search over encrypted data. The stream of random bits ...
2k views

### Is secp256r1 more secure than secp256k1?

Curves secp256r1 and secp256k1 are both examples of two eliptic curves used in various asymmetric cryptography. Googling for these shows most of the top results are Bitcoin related. I've heard the ...
893 views

### Change Salt when Changing Password?

Assume a password storage scheme using a computationally-expensive hash algorithm and a CSPRNG salt. User ID, salt, and hash value are stored in a table; if the table is compromised, all three ...
33 views

### Hard problems in composite order group even when factorization is known

Composite discrete log problem has been proved to be reducible to hardness of factorization and discrete log on the prime factor groups. Are there any problems apart from that in composite order ...
36 views

### What is the restriction on k, for the kth composite residuosity problem to be hard

This paper considers the exponent to be an odd integer. When k = 2, it is called the quadratic residuosity problem (mod n where n is composite) which is hard and can be solved if the factorization of ...
105 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 ...
106 views

### Hill Cipher question

Recently, I was given three ciphers to crack for my cryptography class. At this point, I have guessed that one of them is likely a Hill cipher (probably 3x3, as that is the most complex we have done ...
63 views

### Statistical tests for pseudorandom permutations

I'm implementing a format-preserving encryption scheme similar to those described in the literature. I want to sanity test my PRP using some statistical tests like TestU01. However, I'm not sure how ...
277 views

### What are options to compute DES retail MAC (aka ISO 9797-1 mode 3) under PKCS#11?

The DES retail MAC, also known as ISO 9797-1 mode 3 with DES, computes the MAC of a block of data using a 16-byte (112 bit) key. It can be seen as CBC-MAC using simple DES with the first half of the ...
197 views

### Encryption-Decryption-Encryption

I have learned from Applied Cryptography that triple encryption with three independent keys in encryption-decryption-encryption (EDE) process gives security not higher then $2^{2n}$ when it comes to ...
107 views

### Which public key encryption scheme is re-randomizable? How can I re-randomize an encryption scheme?

Which public key encryption scheme is re-randomizable? Is there any library for re-randomizable encryption scheme? If not, how can I re-randomize a given public key encryption scheme? I cannot find ...
340 views

### AES-ECB as an authentication mechanism

ECB is considered to be insecure when used for confidentiality because identical plaintext result with identical ciphertext. But what if we use ECB for authentication? Assume A wants to transmit an ...
37 views

### Size of Messages Exchanged by PRV and VER for Schnorr Protocol

In this file Elliptic Curve Based Zero Knowledge Proofs and Their Applicability on Resource Constrained Devices I don't understand the Table 6 (Table 6: Size of Messages Exchanged by the Prover(PRV) ...
110 views

### Complexity of verifying OTP secret

What is the minimum number of unique pairs of digests and inputs to a one-time pass needed to verify that a secret is equal to a ...
96 views

### What is the exact purpose of length padding in Merkle–Damgård hash functions? [duplicate]

Is a length padding technique in a hash function used to avoid length extension attacks ?
48 views

### Advantages of using intermediate hash over full hash in digital signature application

Description of intermediate hashes Intermediate (or partial) hashes are canonical forms of digest state that can be transferred from one hash implementation to another, so that the other, limited ...
411 views

### Entropy of the key

Suppose a $1000$-bit key used in the one-time pad is not randomly and uniformly generated. Suppose that the values of the first $5$ bits are $0$, and the other $995$ bits are randomly generated and ...
201 views

### Are SSL/TLS used for maintaining data confidentiality?

In SSL/TLS, we use symmetric and asymmetric keys to encrypt the data. Does that mean that the keys are used to encrypt the data (preserve the integrity) or provide a secure channel for the data to be ...
198 views

### How is HMAC hashed message decrypted on the receiver side

We know that MAC algorithm and key are used in both sender and receiver side to get the matching MAC tages to prove that the data is authentic. Now in HMAC we know that, it makes use of crytographic ...
71 views

### What does Set Membership actually prove?

While going through this paper, I came across the idea of Set Membership proofs. The proof allows a prover to prove that a value is contained in some set. The point where I am confused is, all the ...
43 views

### Is MAC algorithm same at both sender and receiver end

The MAC algortihm which is used along with a secret key to generate a MAC tag on the sender end ,is it same at the receiver end also who again uses a MAC algorithm to generate a tag? If yes, then how ...
51 views

### How to make a document truly read only

How is it possibile to cryptographically make a document truly read only? As in read only I imply that the user can obviously view it which can be achieved by coding which pixels have which colors. ...
35 views

### FSB Hash Functions and Convetional hash Functions

I'm reading FSB cryptographic hash function and the authors say that security of this function depends on NP-Complete Problem: "Decoding Linear Code Unlike most other cryptographic hash functions in ...
77 views

109 views

### Privacy-Preserving relational databases: checking the existence of a record (or multiple records)

I would like to know if there exists a protocol which performs the following operation in a privacy-preserving fashion: User $U$ wants to know whether a record is stored in the database. The primary ...
242 views

### Is SHA related to AES or TLS in any way

I have been reading about SHA-2 family and I found a lot of in depth details, but I am confused about how it is related to TLS and AES. TLS encrypts data between server and client, but does it make ...
171 views

### How is the following different than RSA Signing of a document?

If the goal is to demonstrate that you are who you say you are, I think the following will work: Bob wants to know that you are Amy. Bob encrypts a number using Amy's public key and then asks her what ...
66 views

### Is multiple encryption using NaCL and TLS better?

In general, the idea of multiple encryption sounds interesting - for creating stronger cyphers (especially against implementation bugs), one could always get the configuration details wrong and mess ...
86 views

### Prevent MITM attack while encrypting data by using ElGamal ECC?

I am using ElGamal ECC to encrypt my plain text data. I want to ensure that my data is safe from a Man-In-The-Middle attack. What methodology I can adopt to achieve this goal? How can we prevent a ...
96 views

### CBC-MAC based on PRF

Why is the block cipher in the CBC-MAC taken to be a pseudo random permutation (PRP) and not a pseudo random function (PRF)? We don't need the bijective property of the PRP. So why go with it?
74 views

### Are partial hashes used in cryptographic protocols?

In my question (and answer) about a partial hash code used within a signature application I found out that partial hash codes are sometimes used within protocols with a relatively restricted security ...
56 views

### Managing data permissions/access through asymmetric cryptography

I want to manage authorization, as 3rd-party permissions, through asymmetric cryptography. I'm concerned about how is it possible to share access of encrypted data with N entities, and be able to ...
163 views

### Asymmetric algorithm for one time signing of small cleartext

I want to generate a key pair such that the private key can be used once to sign a small message (1024 bytes) at some indeterminate point in the future and the public key can be used to verify that ...
115 views

### Secure Deduplication and Encryption in a data store

Assume: We have a centralized data store that can store whatever we need Every user is online Function $f : File \to Key$ gets access to the store, and is the same for all users. $g : Key \to File$ ...
65 views

### Implementing the Mceliece Encryption - making the Generator Matrix

I am working on an implementation of the Mceliece Encryption system (MCE) and the Niederreiter encryption system. I have been through the basics of finite fields, polynomial arithmetic and some coding ...
178 views

### practically verifying block ciphers strength [closed]

How do we verify practically the strength of a block ciphers? Most of the security analysis of block ciphers is usually around theoretical analysis and proofs in some random oracle model etc. For ...
169 views

### Homomorphic Encryption: how does the equality test on ciphertexts work?

Let's suppose we have a asymmetric crypto-system $H$ which is homomorphic with respect to some function $F$. Alice encrypts a message $m$ with her private key $e$ in the crypto-system $H$ and ...
63 views

### Question on Waters IBE

I'm reading “Efficient Identity-Based Encryption Without Random Oracles” by Brent Waters. In Page 9, I don't know how ...