Design of cryptographic primitives (algorithms), like block ciphers, stream ciphers, random-number generators, hash functions, MACs, key exchanges, public-key encryption or signature schemes. Also tag with the relevant type of primitive. If you ask about a known existing algorithm, also tag with its ...

learn more… | top users | synonyms (1)

2
votes
1answer
156 views

How are Predicate Encryption algorithms implemented?

After a lot of reading on the internet, i can't seem to figure out how Predicate Encryption works. As i read, it consists of 4 algorithms: ...
3
votes
1answer
44 views

Distributing blocks with validation and non-dependant list generation

Problem Suppose I have a system of nodes that can communicate with a parent node, but not among each other. Suppose then a file on the parent node is split up into blocks and divided among the ...
2
votes
1answer
142 views

Is this algorithm secure?

I recently found this site, proposing a hashing algorithm for passwords. They describe the following: pad the password on both sides with SHA1(email) to ...
3
votes
2answers
308 views

Is there a way to do fair exchange between two parties who don't trust each other?

Let's suppose we have an Alice who knows a secret key A, and Bob who knows key B. Using their own keys, they each encrypt a message (Alice encrypts $m_A$, Bob encrypts $m_B$) with their own key, and ...
5
votes
6answers
1k views

Where can I begin to study the math behind modern cryptography?

I've been studying crypto for almost a year now, implementing algorithms, reading books, studying code, etc. The deeper I go in, the more I realize there is; I feel like I've just barely scratched the ...
4
votes
1answer
454 views

What are the constraints for an IV using AES in CBC mode?

I'm designing a protocol for use into a VPN software. The VPN frames are encapsulated into AES-256 CBC encrypted frames. I understand that IVs must be uniquely used for each message encrypted with ...
1
vote
0answers
147 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 ...
7
votes
3answers
590 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 ...
3
votes
1answer
271 views

Are there any secure commutative ciphers?

This answer lists two commutative cipher algorithms - Pohlig-Hellman and SRA. However, they don't appear to be too secure. My question is, here there any commutative ciphers out there that are secure ...
5
votes
7answers
397 views

Turning a cipher into a hashing function

This is theoretical question. I'd like to know if it's possible (and what are eventually the consequences), not that I'm going to do it in one of my projects. ;) The first hashing functions created ...
1
vote
1answer
690 views

Which one is fastest? Karatsuba or Montgomery multiplication?

Is there any complexity analysis between Karatsuba and Montgomery multiplication algorithms? It seems that Karatsuba is more general in the sense that is not modulo tuned while Montgomery it is. Does ...
1
vote
2answers
589 views

Fastest multiplication algorithm for efficient exponentiation in C++?

First I apologize if this question is better tailored for SO, but since I'm using the method for crypto stuff, I thought I'd ask anybody that might know here. Karatsuba algorithm does a pretty good ...
0
votes
1answer
111 views

Secure way to compare two secret numbers without disclosing them?

For example, two people want to know who is the older, without disclosing their age. Is there a secure way to do this without a third party involved?
0
votes
1answer
109 views

Trapdoor implementation

Please refer to this secure index paper. On page#6, a trapdoor is defined as ...
-1
votes
1answer
160 views

Same Size Crypto Algorithm?

I need to know there is any algorithm that crypts data in same size, Any knowledge appriciated! Thank you!
0
votes
2answers
307 views

Properties of Ideal Straight P-Boxes

What properties should an ideal straight P-Box exhibit?
3
votes
2answers
246 views

Two step encryption

Is there any asymmetric cryptography algorithm which will allow recursive encryption. ...
0
votes
2answers
136 views

Bent Combining Functions

Bent functions are boolean functions with maximum nonlinearity and are widely studied for their potential applications in cryptography. Lets say you wanted to use a simple two input AND gate as a ...
1
vote
2answers
132 views

Encryption algorithm which produces comparable results for substrings

I am wondering is there any encryption algorithm available which produces comparable string. I am expecting the output as shown below. ...
1
vote
1answer
90 views

How to hide bit frequency of the inter-packet delays covert channel?

I encode a hidden message as different delays between packets of another data stream. My implementation now is that for each bit, if the bit is 0, a inter-packet ...
-2
votes
0answers
368 views

Why is there a strong distinction between stream and block ciphers? [duplicate]

If I don't err, in the literature a stream cipher is one in which each plaintext bit is processed individually, commonly via xor-ing with one bit of a random or pseudo-random bit stream, while a block ...
0
votes
1answer
165 views

Design criteria for AES

I hope somebody can help me understand the design criterias for AES. Therefore, I would be really thankful if somebody could explain "non-linearity" in this context. A criteria for the s-box in AES ...
0
votes
2answers
251 views

Can you help me with this Random Number Generator function?

By someone's suggestion, I am posting this question from math.stackexchange.com. I want to find out a suitable function or algorithm, which can provide a random sequence like this… Input: $3$ ...
4
votes
5answers
2k views

Are there hash algorithms with variable length output?

I understand that for example MD5 produces a 128 bit hash value from a given text of variable size. My question is if there is a hash-like algorithm that will produce a hash value where one can ...
5
votes
1answer
700 views

How do I calculate CRC32 mathematically?

I want to calcuate the CRC32 algorithm using polynomials directly but I don't know how. I found the generating polynomial listed here https://en.wikipedia.org/wiki/Cyclic_redundancy_check. This ...
3
votes
2answers
204 views

Are there any papers explaining how to port textbook RSA to realworld RSA?

Are there any papers, books, or link where it explains how the plain vanilla "textbook RSA" is actually implemented in practice with all the padding and stuff? Basically, I would like to know the ...
0
votes
2answers
195 views

Idea for user/pass hashing to prevent rainbow tables, would it work?

I'm very new to cryptography (and security in general, for that matter), but I had an idea that I'm sure is very flawed, but is worth asking. If a computer user, online account, etc, needs to verify a ...
6
votes
1answer
112 views

Abstracting primitives and modes of operation

I am developing a symmetric crypto library and have reached a roadblock. Looking at block ciphers, it is quite obvious that all block ciphers are trivially abstractable as a simple primitive ...
2
votes
1answer
283 views

Padding for the TEA

Sorry if this is a noob questions, but I finally figured out how to implement the Tiny Encryption Algorithm in C++. My question is what to do about padding the key and the plaintext? I know that ...
1
vote
2answers
168 views

How hard is to find the operators of an addition knowing the sum of them?

I want to learn whether or no there is a cryptographic primitive,scheme assumption that is based on the following hard problem if it is hard . By hard we mean that we have a polynomial adversary: The ...
6
votes
2answers
1k views

Why do block ciphers need a non-linear component (like an S-box)?

Why is there a requirement of "Non-Linear functions" as a component of many popular block ciphers (e.g. the S-box in DES or 3DES)? How does it make the cipher more secure? The only intuition I have ...
7
votes
5answers
2k views

Are there any simple and yet secure encryption algorithms?

Being very new to C++ and cryptography, I finally managed to implement a version of the Vinegere algorithm. I would like to try something a bit more complicated. I have looked at AES and DES and ...
1
vote
1answer
68 views

Cryptographic Algorithm/Protocol needed

I am trying to achieve the following: Encrypted files are stored on users filesystem. The user uses my client to authenticate against a server. Once he is authenticated successfully he gets a token ...
3
votes
1answer
369 views

Do Cryptographic Hashing Algorithms operate only on Integers?

Do all the Cryptographic hashing algorithms operate only on integers (32 bit or 64 bit)? Is there any operation performed on Floating Point Numbers as well? The reason I ask this is because I read ...
2
votes
2answers
225 views

Algorithm Design for only Mutual Information Sharing

Bob and Alice each have a bit string they want to keep private. They each want to know what the bitwise AND of their two strings would be without telling the other or anyone else listening to their ...
7
votes
1answer
783 views

Why Addition Mod 32?

I was looking at the algorithm for Twofish, and I noticed that in some places a XOR is used, but in others, they use "addition modulo-32." What makes modulo-32 special? Why not always use XOR? Why not ...
3
votes
1answer
374 views

Is XOR in a CBC-like mode secure?

Assuming that $K_{n}$, $P_{n}$, and $C_{n}$ are individual bytes of the key, plaintext, and ciphertext respectively. The first byte of ciphertext is computed like this: $C_{1} = K_{1} \oplus P_{1}$ ...
3
votes
1answer
318 views

Verilog simulation & synthesis of Diffie-Hellman key exchange

Is there any freely available verilog implementaion of Diffie-Hellman key exchange? I couldn't find anything using google. So, assuming its not there I started implementing on my own. The code is ...
1
vote
3answers
1k views

Does encrypting twice using the same block cipher produce a security weakness?

If I use the output of a cipher, for example a block cipher such as AES and encrypt it again with the same algorithm, I read that this introduces weaknesses into the overall security of the system. ...
0
votes
3answers
597 views

Crypto-Compression Algorithms?

I was wondering, whether there exist such algorithms/enciphering procedures which both compress and encrypt the input data. That means, for starters, the output will be both smaller in size and ...
1
vote
2answers
1k views

Symmetric vs. Asymmetric cryptographic approaches to data security

I know the basic differences between Symmetric vs. Asymmetric cryptography, but I'd love to know more details: Exactly why is the asymmetric approach slower than the symmetric? Why does it make ...
2
votes
1answer
72 views

Rapidly changing passwords?

Suppose you need to authenticate yourself to a program with the password - but the program's source code is public, the program doesn't have access to any private information and all your ...
3
votes
1answer
95 views

Is the following scheme secure for different cipher

Let's say I have two keys K1 and K2. two messages M1 and M2 of the same length. Cipher (E,D) 3 ciphertexts: C11, C12,C22 where Cij = E(Ki, Mj) In situation ...
2
votes
1answer
462 views

If you had to implement the BGN Cryptosystem, how would you do it?

If you had to implement BGN, how would you do it? I'm looking for an implementation of the public-key cryptosystem due to Boneh, Goh, and Nissim (aka BGN), or at least some suggestions on ...
4
votes
2answers
4k views

Difference between “Signature Algorithm” and “Signature Hash Algorithm” in X.509

What's the difference between the "Signature Algorithm" and the "Signature Hash Algorithm" found in an X.509 certificate? Why does it need a "Signature Hash Algorithm"? Edit: I'm creating the ...
10
votes
3answers
583 views

What is the best way to put a backdoor in an encryption system?

How can you put a backdoor into an encryption algorithm? Are there any techniques that can be used to reduce the time it takes to break a key? I am looking for practical examples encryption schemes ...
9
votes
2answers
2k views

How can I calculate the SHA-256 “midstate”?

Recently I've been trying to implement some Bitcoin-related code, and I've stumbled upon a weird concept, a SHA-256 "midstate". Some explanation is given here. The general concept is that Bitcoin ...
0
votes
1answer
246 views

Can you help me understand ECC Cryptography and it's algorithm?

I want to know the basic understanding of ECC algorithm for cryptography. But I am not aware of the algorithm. Can anyone provide me with a basic explanation of the algorithm?
6
votes
3answers
252 views

Can nesting different ciphers with different keys ever decrease security?

Very related to this question but not addressed there. Does the following construction risk introducing any vulnerabilities that render it less secure than using either of its individual components ...
5
votes
3answers
583 views

Can I safely replace XOR with ADD in a stream cipher?

In a stream cipher, the bytes of the plaintext are usually XORed with the keystream to produce the ciphertext. Would there be anything wrong with adding the bytes instead (with overflow), if adding ...