Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
0
votes
0answers
28 views

Security implications of an extra inner encrypt for a single block Matyas-Meyer-Oseas hash function

Was giving some thought to simple MMO constructions for fast single block hash functions for things like PQ crypto. There's Haraka, but that's not standard and readily available while simple AES is in ...
0
votes
0answers
53 views

Unique numbers with $P^aQ^bR^c \mod N$ for each combination of $a,b,c$ possible? Would it be safer than separate form (like $T^a \mod P$ for each)?

Main question: Is the computation of $a,b,c$ in $P^aQ^bR^c \mod N$ (much) harder than in $T_p^a \mod P$, $T_q^b \mod Q$, $T_r^c \mod R$ ? (assuming the first form exists) $P^aQ^bR^c \mod N$ With $P^...
0
votes
1answer
44 views

How much more secure is $c = mg_1^r + g_2(g_1(g_1^r-1)/(g_1-1)) \mod p$ compared to just $c = mg_1^r \mod p$ (dis. log), all known but $r$?

To encode a message $m$ to a cipher $c$ you can use the only hard solvable problem of computing the discrete logarithm with a generator $g$ in base over a prime $p$. $c = mg_1^r$ mod p If an ...
5
votes
2answers
115 views

Origin of values for “security margin”?

It seems that the acceptable "security margin" for ciphers is set to be between 25% and 30% as a target by designers, where this number represents the number of rounds that remain "unbroken" for a ...
6
votes
1answer
157 views

Deterministic Authenticated Encryption with AES-OFB and HMAC

I have an encrypted column in a database that stores sensitive information. The existing encryption scheme is deterministic and a database index exists on the encrypted value to allow searching. I am ...
0
votes
2answers
74 views

human readable unpredictable & no collision uid based on time

I need to create an unpredictable uid based on time. I plan to allow it to work during a time frame of 100,000,000 seconds. So the seconds will go from 00000000 to 99999999. I need an algorithm that ...
1
vote
1answer
88 views

Comparing Shanks' Algorithm to Brute Force

I'm trying to understand how/why Shanks' algorithm solves the discrete log problem $y=g^x \bmod p$ faster than a brute force search does. Any explanation would be great.
1
vote
0answers
49 views

How to create an ultra-secure connection between two clients with xor? [closed]

At work, I was asked to create ultra-secure connection over lan between two computers. It will be some kind of messager. I have a bunch of same random data in them(near 100mb). Also I can start a ...
6
votes
2answers
332 views

Would a HMAC digest make sense in an RSA / ECDSA signature?

When MD5 and SHA1 were broken there was, each time, a scramble to upgrade software and certificates to remove the offending algorithm. However, in each case, the HMAC variant of each hash function was ...
-1
votes
2answers
586 views

Can Shamir’s Trick crack the cryptographic strength of ECDSA?

Recently stumbled upon a discussion in the forum What is Shamir’s Trick used for? Are there any such examples?
0
votes
2answers
191 views

Why doesn't the formula work when checking two ECDSA signatures?

There are two generated ECDSA signatures X - Private key S = ((Z + (X * R)) / K) mod n S` = ((Z` + (X * R`)) / K`) mod n G - Base point, of order n; ...
0
votes
1answer
154 views

El Gamal Cryptosystem Proof, Step-by-Step Explanation Needed. I feel like I don't understand what I have on this proof

Can someone provide a good and thorough explanation of the El Gamal proof? Basically, I need a step-by-step breakdown of what is happening at each important part in the algorithm. I haven't been able ...
0
votes
0answers
20 views

Analyzing RC4 with a reduced state array [duplicate]

RC4 is a stream cipher which uses a 256-element array of 8-bit values. All operations are done modulo 256. Is there any research on modified versions of RC4 using a smaller state array? How small can ...
18
votes
4answers
3k views

Are encryption algorithms with fixed-point free permutations inherently flawed?

Flaw in Enigma One of the Enigma machine's flaw was the derangement (fixed-point free permutation) of the produced ciphertext, or simply put: No plaintext-letter can be enciphered to itself. See this ...
2
votes
1answer
109 views

Generating a key pair using a signature generated by an existing key

I’ve built an app in which each user has a private/public key pair and I want to generate a second one for them, however I cannot store the second private key anywhere. What would be the drawbacks ...
1
vote
0answers
87 views

Explaining Berlekamp-Massey Algorithm in simple/layman term?

My foundation in Mathematics is not great. But I would like to understand how Berlekamp-Massey Algorithm works and how it is used in lay-man terms. The only thing I find out there is the emphasis on ...
2
votes
0answers
95 views

Understanding LFSRs and Berlekamp-Massey Algorithm [duplicate]

I have a tutorial question which focuses on LFSRs and Berlekamp-Massey Algo (which is totally out of my syllabus). Please forgive me if my questions seem stupid. I'm given these information: {"...
0
votes
0answers
37 views

Proxy decrypt algorithm in Extended Proxy-Assisted Attribute Based Encryption (ABE) Scheme

Context I'm trying to implement the Attribute-Based Encryption (ABE) scheme described in the paper - Extended Proxy-Assisted Approach: Achieving Revocable Fine-Grained Encryption of Cloud Data (Yang ...
0
votes
1answer
74 views

How do I figure out the number of unique combinations

I am developing an algorithm that uses a lookup table to process the data, I want to know how many unique tables can be created. If I have a table of 256 values I know that 256! would tell me how many ...
1
vote
2answers
51 views

Is there any way to check signed documents in a group of people without knowing who signed which?

Let's say there are 3 people A, B, C. Everybody knows their public keys. They sign documents/messages and normally we can know who signed which by checking with their public keys. Is there any way to ...
0
votes
0answers
16 views

Are compressed pairings used for Barreto-Naehrig curves in practice?

In 2009 Galbraith and Lin wrote the article "Computing Pairings Using x-Coordinates Only" https://link.springer.com/article/10.1007/s10623-008-9233-3, where they proposed to compute pairings on ...
0
votes
1answer
309 views

Choosing encryption algorithms and encryption protocols in military systems

Militaries use their own cryptographic algorithms, those of a private third party, or ones that are openly available. But fear of a backdoor having been planted in publicly-available encryption ...
10
votes
4answers
3k views

If Kerckhoff's Principle holds, why do we need a cipher at all?

I understand Kerckhoff's principle, in a very practical sense, that the best attack that can be performed on a given cryptographic algorithm should be only as practical, if not less practical, than an ...
0
votes
1answer
58 views

How to prove that work is done without actually knowing the payload

Is there a way for an algorithm to run securely on one end, whilst the other end is able to be notified and also verify that it has run and done the work without knowing what the actual payload is? ...
3
votes
1answer
151 views

Improving efficiency of an “encryption” algorithm based on a chaotic map

I've implemented an "encryption" algorithm that uses the deterministic chaos of an extended logistic map: $x_{n+1}= r_n \cdot x_n \cdot (1-x_n)$ $y_{n+1} = \begin{cases} \text{$x_n+y_n$}...
1
vote
1answer
237 views

Can Base64 be seen as a way of encryption if we use different index table?

As we know, the index table (which maps bytes in [0, 63] to characters) of Base64 encoding is public, so everyone can decode Base64 strings from others. But what if we use a shuffled index table and ...
-2
votes
1answer
339 views

How could I test my own Cipher? [closed]

I recently developed a new cryptographic algorithm. I just initiated with just nothing in mind. But being near to completion (though my algorithm is constantly developing. Now it is version 11.02), I ...
-2
votes
4answers
2k views

Size of A Hashed String Using SHA-512

When hashing a messages of size of n, does the SHA2 algorithm always produce the same sized hashed value? The reason I am asking is that I am building an OAuth 2.0 ...
0
votes
1answer
167 views

Question about brute force running time

Quite a simple question though I can't wrap my head around it: The key size is: $n$ Because it's brute force it tries each possible key once from $0$ to $n$, but in my head that just makes the run ...
3
votes
0answers
69 views

Reduction from integer factoring to computational Diffie Hellman

The computational Diffie Hellman (CDH) problem for ${\mathbb{Z}}^*_p$ is given a prime $p$, a generator $g$ of ${\mathbb{Z}}^*_p$, and a pair $(g^i, g^j)$ to compute $g^{ij}$. The value $g$ is called ...
3
votes
2answers
248 views

Does there exist a CSPRNG that does not require generating prime numbers, but also does not depend on any other cryptographic primitives?

The following excerpt is taken from the “Cryptographically secure pseudorandom number generator” article on Wikipedia: CSPRNG designs are divided into three classes: those based on ...
3
votes
2answers
235 views

Cryptography scheme to prove you really are the author for something

Say I'm a researcher like Satoshi Nakamoto that wants to stay anonymous. I want to publish documents and sign them somehow. A few years, I want to reveal my identity and prove it was me who was ...
3
votes
1answer
76 views

Could we use a more efficient hash for signature generation?

Is it possible to use a more efficient hash - such as one based on GHASH - instead of a cryptographic hash for signature generation? In other words, could a combination of a fast hash and the private ...
2
votes
2answers
80 views

Is there a way to sign a message without being allowed to see it?

I want to sign a message while not being able to see the message. Logically, there should be a way, I just don't know how this translates into cryptography. Here is an illustration for what I mean: ...
4
votes
3answers
358 views

Is it possible to exactly reverse engineer an unknown cipher inside a black box?

Consider the following arrangement:- There is an unknown cipher algorithm operating inside the black box. You can enter infinite key /plain text pairs, and observe all of the outputs. The box might ...
0
votes
1answer
41 views

Secure offline treasure hunt

Say I would like to create an app that would allow users to organize treasure hunts for their parties. The host of the party would create a list of GPS coordinates for each hiding spot and distribute ...
0
votes
1answer
442 views

How many rounds of encryption is ideal?

I am a newbie to the cryptography world. I am working on a custom algorithm that encrypts the data multiple times and results in a cipher text. It uses a different key in each round to encrypt it. I ...
3
votes
1answer
95 views

Can length extension attacks be avoided by a single bit flip?

It always seemed to me that length extensions are possible simply because no special operation is performed after the last operation - for instance in a Merkle-Damgård construction. Basically the MD ...
1
vote
2answers
94 views

Encrypting current time using 3DES as a signature

I came across a peculiar system for generating "signatures" ("signatures" is within quotes because this is a bad use of 3DES) in the wild. It works as follows: a symmetric key is generated and used ...
2
votes
0answers
38 views

Can we encrypt data that must be decrypted with any private key plus a server generate bits?

I have come up with a scenario to make a secure data. Suppose I have a public encrypted file that anybody can download. But whenever anyone want to decrypt that data they need to get a key from server ...
4
votes
2answers
214 views

Is this algorithm good enough for small radio messages?

This question is related to: How to implement security - authenticity/confidentiality/integrity for 6/14 bits radio messages? I am looking for a message that an attacker listening to the radio ...
8
votes
3answers
647 views

Where can I find a description of the SHA-0 hash algorithm?

Where can I find the description and or pseudocode for the SHA-0 hash algorithm? I am looking for something on these lines: HMAC RIPEMD. I have been implementing a few of those (HMAC, HOTP, TOTP and ...
2
votes
0answers
165 views

How few cryptographic primitives can we use to derive all other constructions?

We have a lot of cryptographic primitives now, and many methods of deriving one type of scheme from another. There are even some like the Merkle signature scheme, which uses a hash function to derive ...
3
votes
1answer
779 views

understanding the block bits for DES

I'm trying to understand cryptographic protocols, and I've started with the DES algorithm. DES specs: it uses 64 bits for the plaintext, 56 bits for the key, with a result of the same 64 bits of ...
3
votes
2answers
205 views

rotor machines: secrecy of wiring

During the heydays of rotor machines, the internal rotor wiring was always a closely guarded secret. Even fully cleared repair staff was not allowed to do anything that could reveal it. As the ...
1
vote
2answers
124 views

Public-private algorithm where it is not possible to recover public key from private key?

Is there an asymmetric algorithm where it is not possible to extract a public key from private key? So far any algorithms I tried (dsa, rsa, ecdsa, ed25519) successfully recover their public keys from ...
4
votes
1answer
66 views

Optimized Garbled Circuit Algorithmic Description

The Garbled Circuit (GC) is now over thirty years old, and many optimization methodologies have been proposed, including point-and-permute, row-reduction, free-XOR, fixed-key blockcipher, half-and. ...
0
votes
1answer
64 views

Cryptographic algorithm for knowing who has more money?

I recall reading about this but forgot what it’s called. Suppose two people want to know who is richer but don’t want to reveal their net worth to the other. How can they securely exchange info to ...
0
votes
1answer
88 views

Reference for the Tortoise and Hare algorithm by Floyd?

Can someone please point me to a book or paper that describes the Tortoise and Hare algorithm by Floyd? I know there are ample websites out there, but for reference purposes, I need a book or paper ...
3
votes
0answers
422 views

Fastest known Elliptic Curve Cryptography “solution” (coordinate systems (multiple?), algorithms, precomputed values etc)?

I am writing an Elliptic Curve Cryptography SDK in pure Swift, and currently I am only using Affine Point and simple Double-and-add. I am soon about to work on a faster solution. I am asking for help ...