Questions tagged [algorithm-design]

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 name.

Filter by
Sorted by
Tagged with
1
vote
1answer
48 views

What papers describe the rationale behind cryptography algorithms

I am trying to introduce myself to cryptographic hashing and encryption. I am looking for original papers of sorts, to describe the inspiration behind why they choose certain numbers, if they are ...
2
votes
1answer
96 views

Montgomery Multiplication with CRT

I am attempting to understand how to use Montgomery multiplication in an RSA private key operation: $X \equiv a^{e} \pmod{n}$ where $a$ is the message, $e$ is the exponent, $n$ is the modulus. Using ...
0
votes
0answers
23 views

Designing number of rounds of specific hashing process [closed]

Consider a certain encryption process/hash function which transform 128-bit blocks into 128-bit blocks. This is not a cipher or complete function yet. I am thinking about the theoretical process. We ...
4
votes
2answers
120 views

What's the name of this random number generation algorithm?

I'm looking for the name of an RNG method or algorithm, described below. Combining multiple results of a non-uniform random number generator can produce a more uniform result. It seems like this would ...
0
votes
0answers
46 views

How to design number of rounds in my cipher?

I have specific cipher which is built from permutations. It has or should has few rounds. If we do 2 rounds it is like 2 permutation composition. 3 rounds are like composition of 3 permutations and so ...
2
votes
1answer
100 views

Cryptographic function that can 'pack' numbers

Is there a cryptographic algorithm that can 'pack' a bunch of strings/numbers and "confirm" if a string/numbers exists (later in the code) while keeping the output hidden? For example, I have ...
2
votes
0answers
69 views

How to construct a “toy” version of the Ascon permutation?

I want to obtain a “toy” version of the Ascon permutation defined for five 8-bit words (instead of five 64-bit words.) It seems that it is possible to use the same bit-sliced 5-bit S-Box. But is it ...
0
votes
0answers
28 views

Are there popular and secure Authenticated Encryption schemes with Salsa20/Sosemanuk in CTR-mode with a Carter-Wegman MAC?

I read that AES/GCM is a good choice for authenticated encryption because: AES has very strong heuristic security Encrypt-then-MAC leaks no information about the plaintext The CW-MAC in GCM can be ...
1
vote
0answers
38 views

Help on validation code algorithm [closed]

I wonder if someone can help me find the algorithm used to generate validation codes from a serial number. I already have some working examples of serials->codes pairs: 19003148 -> 523254 19003162 -...
1
vote
1answer
114 views

Error correcting codes that are indistinguishable from random

Suppose you have a public program P(n) which takes message n and generates an encrypted output (utilizing asymmetric cryptography) for some entity which has the private key to decrypt it. Using a ...
0
votes
0answers
35 views

Approach used with XOR cipher in black box scenery

What's the approach used in cryptanalysis to make an decrypter for a simple xor stream cipher in a Black Box scenery with only the output?
0
votes
0answers
26 views

How to determine the maximum number of times the DES algorithm needs to be run?

I am only a beginner in cryptography and I am getting confused by the following: Question Consider a known-plaintext attack performed on a double-DES cryptosystem. (a) Determine the maximum number ...
4
votes
1answer
47 views

Multiparty dataset intersection count

Typically, Private Set Intersection (PSI) protocols let you learn the subset of items on each party's dataset that are in the intersection. The problem in this case is a relaxation of these kind of ...
1
vote
1answer
55 views

How to calculate RSA Key Size correctly starting from 384 bits to 15360 bits or beyond 15360 bits

Hello fellow experts here, I am new to cryptography. Recently I looked into RSA Key Size (Microsoft RSA library), it actually describes that the minimal key length required is 384 bits and maximum ...
0
votes
0answers
31 views

How to calculate degree of confusion of an encryption algorithm?

I am programming an encryption-decryption model in python 3. I want to check its strength. I found 3 methods to check, they are: 1. Degree of diffusion 2. Degree of confusion 3. Integrity check For ...
1
vote
1answer
29 views

Can MFA codes be predicted if you know what their values were at a previous time?

I use an app on my phone that, after scanning a QR code on a website, gives me 6-digit codes which change every 30 seconds. These codes can be used for Multi-Factor Authentication (MFA) on some ...
1
vote
1answer
55 views

easy hash algorithm to use without computer [duplicate]

I am searching for a simple hash algorithm(s) which can be used to calculate relatively secure hash without using of any computer. Some requirements: use only simple arithmetics operations (+ - / *, ...
0
votes
0answers
19 views

Finding the relationship between generating elements represented by a Hamiltonian cycle of a Cayley graph (like in strong RSA condition)

Consider an undirected Cayley graph of a finite group $\mathbb{Z}_p \times \mathbb{Z}_q$, where $p$ and $q$ are distinct primes. Let the generating set for the Cayley graph be $S=\{g_p, g_q\}$, where $...
0
votes
0answers
42 views

How could I verify that a contract was actually sent to me from the client as soon as the contract is received?

with the information provided - what would be the best solution - something like document management program like IBM Filenet ? or trusted timestamping? If I want to store electronic contracts for ...
0
votes
0answers
18 views

How to disperse personal data before returning?

I am working on a project that is dealing with personal data. The task is to find a method such that when user makes a query into multiple institutions, the result will contain already scattered/...
0
votes
0answers
34 views

WPA/WPA password algorithm

I would like to understand the mechanism behind wpa/wpa2 algorithm. Is there any script that can put this theory:(Key = PBKDF2(HMAC−SHA1, passphrase, ssid, 4096, 256)) into action to test it ? I made ...
1
vote
1answer
57 views

What are the standard properties of an S-Box [duplicate]

Apart form the following, what are the other properties of a good cryptographic Substitution box or the S-Box: Changing one input bit should change about half of the output bits. Each output bit ...
1
vote
0answers
22 views

How does one ensure that a handshake protocol is secure assuming all underlying cryptography used are secure

Suppose one have to design handshake protocol using known secure cryptographic algorithm. The designer of implementer can assume that crypotography is secure but how would they ensure protocol itself ...
0
votes
1answer
39 views

How can I get VMAC Code in pure c?

I had find a paper about VMAC algorithm:VMAC: Message Authentication Code using Universal Hashing. Now I want to implement this algorithm, But i don't find test vectors about it. Who can give some ...
0
votes
1answer
60 views

How modern messengers encryption keys can't be hacked [closed]

I dont know is this question more like reverse-engineering or cryptographic. Why governments are hunting for encryptions keys? Aren't they delievering by the network the same as the encypted messages? ...
4
votes
1answer
328 views

I'm trying to understand which cryptographic algorithm is this

I'm reversing a cryptographic algorithm. This is part of the encryption function translated to python (starting from assembly code): ...
2
votes
1answer
64 views

Is there a term for cryptographic attacks where you can verify decryption without assuming any known structure on the plaintext?

The questions https://security.stackexchange.com/questions/1696/if-someone-breaks-encryption-how-do-they-know-theyre-successful and https://security.stackexchange.com/questions/119887/how-to-know-if-a-...
0
votes
0answers
66 views

What is meant by the duality and homomorphism of an encryption algorithm?

I am new to the field of cryptography and security so spare me with this question. What is the general idea of duality and homomorphism of an encryption algorithm? And how one may prove those two ...
2
votes
1answer
65 views

How to generate a 16 X 8 perfectly nonlinear S-box

I want to generate a 16,8 perfectly nonlinear S-box for an encryption algorithm I am working on. I don't have a background in math, and I'm an undergrad, so a lot of the math involved is very ...
1
vote
1answer
59 views

Are PQ/Classical Hybrid Key Exchanges a reflection of how little we trust PQ cryptography primitives?

My students have asked me some questions about why there are standards being developed for hybrid public key systems with both a classical and a post-quantum component. Given that when elliptic ...
0
votes
1answer
32 views

With the random numbers generated, can I know which RNG seed was used?

My teacher challenged us to find out which seed was used to generate some random numbers. I would like to know if it is possible to decipher the seed using the generated numbers (break the linear ...
1
vote
1answer
94 views

Is it possible that a signing algorithm produces no output?

I am reading Vadim Lyubashevsky's paper on Lattice Signatures without Trapdoors and I came across a somehow counter-intuitive part where he defined an algorithm $\mathcal{A}$: $y\leftarrow D_\sigma^m$...
0
votes
2answers
132 views

Is there an efficient algorithm that allows to construct a cryptographically secure $n$-bit hash function based on two unkeyed $n$-bit permutations?

Let $f(x)$ and $g(x)$ denote two independent, “ideal”, unkeyed, public $n$-bit permutations (two publicly known bijective functions that produce $n$-bit outputs from $n$-bit inputs), where $n$ is an ...
1
vote
1answer
60 views

Are there any algorithms for which generating any zero-knowledge proofs is not practical?

It is related to my earlier question: Can zkSNARK or other zero-knowledge proofs be used to proof message authenticity without revealing private key? Are there any algorithms for which generating ...
1
vote
1answer
71 views

Can zkSNARK or other zero-knowledge proofs be used to proof message authenticity without revealing private key?

The situation: Alice and Bob are exchanging messages encrypted by some known asymmetric encryption protocol. All their encrypted messages, as well as public keys are intercepted by Charlie. Can ...
5
votes
2answers
141 views

Is the ChaCha20 block function reversible using known plaintext?

I've been recently implementing the chacha20 stream cipher with Poly1305. As the core operations which make up the Quarter Round of chacha20 (ARX - Addition Rotation Xor) are indeed reversible, does ...
1
vote
1answer
54 views

How to find a small generator with small inverse? Does it have negative impact to security? (for Schnorr subgroup of $\mathbb{Z}/P\mathbb{Z}$)

Given a prime $P$ with $$P= r \cdot q+1$$ with $q$ prime as well. I'm looking for a generator $g$ of the Schnorr subgroup with order $q$ which is small by value and has a inverse (to $\bmod P$) which ...
0
votes
1answer
76 views

Is there an efficient algorithm that allows to obtain a uniform distribution of all possible $4$-bit permutations from a single keyless $4$-bit S-Box?

Let $S$ denote a keyless permutation that operates on $4$-bit inputs and returns $4$-bit outputs (that is, $S$ is a $4$-bit S-Box). In this question, $x_0$ denotes an arbitrary bitstring that ends ...
0
votes
3answers
132 views

Why didn't people redesign the key scheduling algorithm of DES to use longer keys instead of using 3-DES?

To overcome short key length of DES, Triple DES was devised. What would go wrong or why didn't people redesign the key scheduling algorithm to use longer keys?
0
votes
0answers
27 views

Asymmetric non-interactive proof of work scheme

I'm looking for a non-interactive proof of work scheme. I want for it to (1) be faster to find solutions to if you're in the possession of an arbitrary secret, like a private key, and (2) for the ...
1
vote
1answer
128 views

Scrypt KDF cipher (scrypt CLI) - known vulnerabilities and cryptanalysis?

There is a scrypt cipher that is used for example by some cryptos like LItecoin for their mining algorithm. I never heard of scrypt. I know eg SHA-256 which is well analyzed and considered as secure ...
0
votes
1answer
54 views

Division of Point in Elliptic Curve: Getting Back Point

Let $P=(x_p,y_p)$ be a point on elliptic curve $E (a, b) := y^2=x^3+ax+b$, for an integer $n$, there exists a point $Q=(x_q,y_q)=nP$ on $E (a, b)$. If $(x_q,y_q)$ and $n$ are given, what is the ...
2
votes
1answer
67 views

How to store encrypted solutions of a find location game?

I'm coding a bot on Telegram to sustain a quiz game. A group of people (authors) can upload photos of streets or particular landscapes that they have found on internet, without any description, and ...
1
vote
1answer
55 views

Are there low-bit hashing or encryption functions for teaching cryptographical concepts?

I understand how hashing and encryption/decryption work at a very high level, where the functions work as a black box. Hashing scrambles the input in a non-uniquely reversible way, whereas encryption ...
5
votes
2answers
216 views

“One-Wayness” of SHA 1

I recently started learning about Hash Functions for my first time, and I've gone through and have tried to understand the SHA1 process. Brilliant does an excellent job of explaining it step by step. ...
0
votes
1answer
182 views

Is there a method to encrypt relations in between values of a cyclic value set and generate values out of this set with pseudo RNG? (all at user PC)

Is there a pseudo RNG and function $f$ with 1.) The RNG produces a value $v_0$ out of $N$ different values (set $S$). 2.) Independent of the RNG the function $f$ generates $v_{i+1}=f(v_i)$ ...
-2
votes
1answer
250 views

What is AES subkey? [closed]

I saw the AES algorithm that at the end of algorithm the buffer that stored in the beginning of algorithm the encrypt/decrypt key. now is store the last subkey. What is the last subkey? Why do I ...
0
votes
1answer
62 views

What does it mean for a number to be “in the order of” a prime number?

In some papers I'm looking at there is some language that says things like "Choose a random number in the order of prime q" and I see some syntax that it is referring to that looks s = Zq (where q is ...
30
votes
2answers
7k views

Theoretically, what if I were to change some magic numbers in, say, AES?

Purely theoretically. I know it's a bad idea to try to invent your own encryption and that's not the intention here. Just a thought experiment. Say, I change some or all of the magic numbers used in, ...
2
votes
1answer
43 views

Signature over MAC value for a random key

Would it be possible to create a signature scheme like this: $ \DeclareMathOperator{Gen}{Gen_{\Mac}} \DeclareMathOperator{Mac}{Mac} \DeclareMathOperator{Sign}{Sign} \DeclareMathOperator{F}{F} \...

1
2 3 4 5
15