Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [hash]

A cryptographic hash algorithm is a function which takes a variable size input and produces a fixed size output. The algorithm makes it difficult to find two inputs with the same output or reconstruct the input from the output.

Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

Hash security and penentration testing

I've been looking at hash security, and how tools like hashcat and John The Ripper work. I seem to have misunderstood some basic stuff, and would appreciate some clarification on: If you're pen ...
QF0's user avatar
  • 101
0 votes
0 answers
22 views

Shared taxonomy for hash, mac and digital signature algorithms and output?

I'm creating a cryptography API, and because naming things is hard, I'm trying to define a common name that identifies functions that accept input of arbitrary length and produce either digital ...
Les Hazlewood's user avatar
1 vote
0 answers
47 views

Why are Functions within sha-256 picked with certain exact magic numbers?

SHA-256, as described in its original paper, contains certain specific functions such as Σ1(X) = RotR(X, 2) ⊕ RotR(X, 13) ⊕ RotR(X, 22) or ...
Jan's user avatar
  • 11
0 votes
0 answers
94 views

Are there a cipher function $E_k$ and a hash function $H$ commutative on composition (permutable)?

Two functions $f(x)$ and $g(x)$ are commutative on composition, or permutable, if $f(g(x))=g(f(x))$. Given a file $f$, is there a cipher function $E_k$ and a hash function $H$ with the property: $H(...
Rafael's user avatar
  • 101
1 vote
0 answers
38 views

Expected size of a set hashed to a specific value

In Theorem D.5 of Goldreich's Computational Complexity: A Conceptual Perspective, Goldreich states: Let $m \leq n$ be integers, $H_n^m$ be a family of pairwise independent hash functions, and $S \...
Germ's user avatar
  • 133
1 vote
2 answers
113 views

Looking for a lightweight hashing algorithm

I'm looking for a hashing algorithm with some unique properties: Most important: It has to be small. Ideally ~400 bytes of x86 assembly Resistant to preimage & collision attacks with no known ...
Mark Nelson's user avatar
2 votes
1 answer
100 views

Rationale for the choice and majority functions of SHA-2

I've been trying to learn why the different stages to the SHA-2 family of algorithms were added - SHA-256 in particular. Here's the pseudocode for the message schedule: ...
Jason Stackhouse's user avatar
2 votes
2 answers
356 views

Simple CSRNG design based on hash function

I was researching designs for cryptographically secure random number generators based on hash function. I know that there is Hash_DRGB but I can not understand why such a complicated design is ...
loewexy's user avatar
  • 21
1 vote
1 answer
505 views

Key generation from partially random data

Suppose an embedded system without a true random number generator peripheral, but nevertheless it is necessary to generate a secret key. Suppose also that this embedded system has an analog-to-digital ...
swineone's user avatar
  • 870
0 votes
2 answers
89 views

Adding 2 hash values

hash(a) + hash(b) = hash(c) When adding 2 hashes values can it be equal to another hash value? Is it unlikely for this to happen? If so why?
randomdude's user avatar
0 votes
1 answer
45 views

What is the best way to use a string with characters other than numbers as a random seed?

Is this done using cryptographic hashing, or just with a sum of the ASCII codes? A possible use case would be on a video game with random procedural generation, where the game allows users to enter a ...
user56510's user avatar
1 vote
1 answer
62 views

Necessity of all three MD-Compliant padding conditions

For Merkle-Damgård hashing, MD-compliant padding is defined as any padding scheme satisfying: $M$ is a prefix of $\text{Pad}(M)$ $|M_1|=|M_2|\Rightarrow |\text{Pad}(M_1)|=|\text{Pad}(M_2)|$ $|M_1|\...
hegash's user avatar
  • 113
0 votes
1 answer
24 views

Digest Signing for GPG Packages

We're currently using file type-specific signing tools (textsign, helmsign, rpmsign) for GPG packages, creating network strain by transmitting entire packages to a signing server. To optimize this, we'...
undefined's user avatar
  • 103
2 votes
0 answers
38 views

Merkle-Damgård construction without MD compliant padding

Is there an easy example of a Merkle-Damgård constructed hash that does not have Merkle-Damgård compliant padding and is collision resistant? Is there an example that does not have MD-compliant ...
revision's user avatar
1 vote
0 answers
44 views

Suffix-free padding scheme for hash function

I would like an easy to read proof that shows that it is sufficient for a padding scheme to be suffix-free for it to be collision resistant. Whenever I have come across such a proof it always seems to ...
revision's user avatar
2 votes
1 answer
66 views

How to design a reversible shifted XOR with an S-box?

According to this post, S-boxes are invertible. Inverting S-boxes can be very easy: you simply create a lookup table that reverse all the possible substitutions of the S-box. E.g. if the S-box maps ...
nalzok's user avatar
  • 123
0 votes
0 answers
41 views

Is integrity guaranteed by sending plain text with public key encrypted JWT and hash?

I am currently developing an RPC system that does not require message encryption, but does need client authentication and verification of message integrity. I want the RPC server to minimize its state ...
pilaoda's user avatar
-1 votes
1 answer
69 views

Is security of Manuel Blum's Mental Hash function dependent on Security Through Obscurity for it's effectiveness?

I have been practicing using Manuel Blum's Mental Hash Function for personal use, described in the link below: Mental Cryptography and Good Passwords However, Rob Shearer has shown that the function ...
its.just.me's user avatar
0 votes
0 answers
43 views

Peer-to-Peer message verification

I have a chat application that uses AES and RSA encryption to establish a peer-to-peer connection between two clients. Although the messages pass through a server, they are encrypted using a single ...
Higgs's user avatar
  • 1
0 votes
0 answers
27 views

Implement true serverless (decentralized) online multiplayer game with cryptography

TLDR, this will be a discussion rather than my private problem. Nowadays, most game developers or publishers have central servers to manage player transactions such as movement, mouse position, and so ...
Muhammad Ikhwan Perwira's user avatar
0 votes
2 answers
69 views

New Service to Service Protocol Presented for Public Scrutiny (Time-based Token Signing), Is it Safe?

I came up with the following protocol to provide a life-time for JWT tokens while differentiating services to communicate securely with web services (service-to-service) using symmetric key signing ...
Adam Memisyazici's user avatar
0 votes
0 answers
40 views

Proving Insecure Hash Function Through Not Collision Resistant

There is a function H : {0, 1}* → {0, 1}^n. On input a message m and two shares of it x, w such that m = x ⊕ w, the function outputs y = H(m) = H(x) ⊕ H(w). How would I find that this NOT a collision ...
sangaCat's user avatar
1 vote
0 answers
26 views

Proof of UOWHF construction from a strongly universal hash family

I am currently trying to rigorously prove Lemma 2.2 of [NY]. More specifically, a UOWHF family can be constructed from a composition of a strongly universal family $G_k = \{g : \{0, 1\}^k \rightarrow \...
Pontakorn Prasertsuk's user avatar
1 vote
1 answer
125 views

What is the purpose of making salted passwords public?

So I was reading through an article about how passwords are salted and hashed through a cryptographic function here, and found out that hashed passwords, along with the plaintext salt values are ...
mantot123's user avatar
2 votes
2 answers
104 views

What does the leftover hash lemma guarantee for a specific hash function?

Suppose I sample a matrix $h$ from $\mathbb{Z}_2^{l \times n}$ where each entry in $h$ is $1$ with probability 1/2. Suppose I also have a set $S\subset \{0,1\}^n$, and I define a random variable $X$ ...
Germ's user avatar
  • 133
0 votes
1 answer
99 views

Should hash salt and public key be a part of cryptographic signature?

I'm updating some piece of software I wrote quite some time ago. It is supposed to sign some content. So at the moment I have the following process: I have a (private, public) keys pair. These can ...
freakish's user avatar
  • 103
1 vote
1 answer
47 views

Signing a file vs. a manifest of cryptographic hashes

I’m interested in the tradeoffs of signing individual files vs. signing a manifest of cryptographic hashes and file names. Let’s say I do some work that results in a handful of files (10s to hundreds),...
baseboard49's user avatar
0 votes
0 answers
72 views

Recommendations for tools and libraries to aid implementation for a Private Key Generator

I'm currently tasked to implement this cryptographic scheme. But currently struggle to understand these hash functions of the scheme. Can anyone explain and suggest a way or some kind of tool to build ...
randomdude's user avatar
2 votes
1 answer
51 views

How does linearity work with SWIFFT?

I read that SWIFFT is a linear hash function, but I don't understand what this means. The obvious interpretation is that if you have inputs $X1, X2$ each of which is an array of 16 64-dimensional ...
the thinker's user avatar
2 votes
1 answer
94 views

Random based on video input, why isn't there some predictability

I just saw this article and many like them before where they use a video of some random movement and a hashing function to make a cryptographic random number generator but I'm always curious why this ...
Joost K's user avatar
  • 123
0 votes
1 answer
48 views

Finding security constraints for different input domains of Ajtai functions

I know that the normal construction for Ajtai hash functions is as follows: Pick $n, m, q \in \mathbb{Z}^+$ such that $n \log q < m < \frac{q}{2n^4}$ and $q = O(n^c)$ for some $c>0$, and some ...
the thinker's user avatar
2 votes
1 answer
59 views

Is it hard to find m, R to make RG^H(m||R)=C?

Assuming the generator of one group $\mathbb G$ is $G$. Given an element $C\in \mathbb G$ and a cryptographic hash function $H(\cdot)$, is it hard for one adversary to find a pair of message $m$ and ...
Twiforest's user avatar
1 vote
1 answer
113 views

BLAKE3 for Block and Stream ciphers?

When assuming the following idea for ciphers: For a block cipher, a 4-round balanced Feistel network where the PRF is BLAKE3 and the key schedule is: input key, input key with every odd bit flipped, ...
user115528's user avatar
3 votes
2 answers
3k views

What’s the smallest known sha256 hash that was ever produced?

Basically the same question as this one, except in my case the value to be hashed doesn’t have to be a valid Bitcoin block, but is a bytearray of arbitrary length and content (and that my use case is ...
user2284570's user avatar
0 votes
0 answers
33 views

Is it possible for a given plaintext and ciphertext to have two different keys? [duplicate]

This has probably been asked before but for a given ciphertext and plaintext pair, is it possible to have two different keys producing said pair? Or there are no collisions in AES, unlike hashing ...
user2338802's user avatar
0 votes
1 answer
113 views

How would I go about reverse engineering a hash function given input string and generated hash

I have a wireless capture of data and it's 12 bit hash. I am trying to identify the actual function that would have generated the hash data. I tried all the generic 12 bit CRC polynomials but none of ...
jay's user avatar
  • 1
0 votes
1 answer
78 views

Adding hashes together

Say I have three 64 byte values that I hash into three sha256 hashes (H1, H2, H3). The data does not contain any secrets and it all public data. I am instead hashing the data for integrity purposes. ...
beegmon's user avatar
0 votes
1 answer
68 views

Is this an example of a sponge construction?

I am having difficulties understanding a sponge construction, as I don't really understand whether the long internal state of a sponge construction is compressed in the squeeze phase, or whether bits ...
RA35's user avatar
  • 43
0 votes
0 answers
157 views

What is the fastest stable 128-bit non-cryptographic hash function?

I need a stable 128-bit hash function which is extremely fast since it will be used for generating unique IDs for billions of objects. It doesn't need to be a cryptographic hash function, nor does it ...
TypicalHog's user avatar
0 votes
0 answers
71 views

hashing two inputs with a single encryption

I'm looking at hash function constructions that use ciphers. There are many which are analyzed in this paper: https://www.cs.ucdavis.edu/~rogaway/papers/hash.pdf but all of them assume that only a ...
David 天宇 Wong's user avatar
1 vote
1 answer
176 views

Hash Output Distribution for Partly Randomised Input

For a good (unkeyed) hash function, if a part of the input is random, is it fair to assume that the output will also be randomised? More specifically, suppose $H$ has an $n$-bit output, and we write ...
Arghya Bhattacharjee's user avatar
5 votes
0 answers
455 views

Public one-way bijection [duplicate]

What methods do we know to construct a function $f:D\to D$ with domain $D=[0,n)\cap\mathbb N$ (thus $n\in\mathbb N$ elements); demonstrably surjective (thus bijective since $D$ is finite); with ...
fgrieu's user avatar
  • 142k
1 vote
2 answers
145 views

Name for number of output values a hash function can produce?

Any hash function has fixed output size but it does not mean that all values of output values are ever used. What's the term for the size of output set? As an aside: Can it be calculated? How do most ...
Euri Pinhollow's user avatar
1 vote
3 answers
122 views

Is the composition of a hash function with a block cipher collision resistant?

Assume $H$ is a collision resistant and preimage resistant (unkeyed) hash function and $E(k,y)$ is a block cipher where $k$ is the key. I am interested into the collision resistance of the composed ...
Morz's user avatar
  • 55
1 vote
1 answer
122 views

Find two hard to reverse functions f and h such that f ∘ h ∘ g = h (f and h injective, no constraints on g)

I am looking from 3 functions $f,g,h$ from $\mathbb N \to \mathbb N$ (they can be bijections, they need to be injective at least), such that: $$f \circ h \circ g = h $$ and $f$ is hard to reverse ...
Mathematical_Noob's user avatar
14 votes
5 answers
9k views

Boss insists on storing SHA2(p) || SHA3(p), claiming it "doubles security"

My friend in the software industry came to me with one of his "dumb boss" war stories. This particular time, his (non-technical but eager to learn) manager came to him and told him to, in ...
squinged's user avatar
  • 143
0 votes
0 answers
36 views

Analyzing Insertion Behavior in a Randomized Hash Table

The following problem of my is from final exam for my online course last year; I couldn't have the time to do it, so I want to check whether my answer is correct; Q5) Given an (entirely) random hash ...
Jaclyn's user avatar
  • 1
0 votes
0 answers
68 views

Secure time based one time password over SMS

I am designing a one time password system, in which I will send the password to the user over some transport (concretely SMS). Once they receive it they will type it into the mobile app. In this way ...
jacksmith's user avatar
0 votes
0 answers
92 views

Algorithm attack on an hash attack (Python)

Here is an attempt at a Python implementation of what is described in the paper I attached as an image. The algorithm is too slow or there is something wrong with the code. Any ideas! ...
surimaji's user avatar
4 votes
1 answer
137 views

Does the length extension attack apply to KDFs?

Older hash functions like SHA-256 and SHA-512 are vulnerable to the length extension attack, which is problematic in the context of a MAC. There are several ways to prevent this: Use a newer hash ...
samuel-lucas6's user avatar

1
2 3 4 5
61