Skip to main content

Questions tagged [format-preserving]

Format-preserving encryption (FPE) refers to encrypting in such a way that the output has the same length as the input, or otherwise has the same format or structure as the input.

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

Lightweight length preserving encryption

I'm in need of an encryption algorithm that can be easily implemented in c, doesn't drastically increase the size of the encrypted data (the data to be encrypted will be approximately 200 bytes and ...
Hristos's user avatar
0 votes
0 answers
67 views

Achieving sub-block non-malleability

I have a noisy one-way communication channel where data is sent as a series of words of width n bits. Assume n is a constant roughly in the range of 16...48. I don't want bit errors in one word to ...
Stephan Walter's user avatar
0 votes
2 answers
143 views

Very small domains in FF1 or similar

I want a family of efficiently computable random-ish bijections $f_{k,n} : [0..n) \to [0..n)$ for $n \le 2048$. We cannot make the $f_{k,n}$ be secure for encryption at this domain size of course, ...
Jeff Burdges's user avatar
  • 1,116
2 votes
1 answer
120 views

Is a naive 27bit FPE algorithm using AES-CTR insecure?

I don't have a deep mathematical background in cryptography. I am reading "The FFX Mode of Operation for Format-Preserving Encryption". Section D says the following. Why feistel? The ...
relent95's user avatar
  • 123
5 votes
1 answer
185 views

Cryptographically obfuscating IP addresses while preserving locality

In an online community, you sometimes have to ban certain IP addresses or even entire IP ranges due to abuse. You may hire moderators to help you with this, but you might not trust them enough to show ...
Isopod's user avatar
  • 53
6 votes
3 answers
245 views

Are small domain keyed permutations inherently unsafe?

In the accepted answer to a question in Computer Science Stack Exchange, it was mentioned that a block cipher in counter mode makes a random number generator with a large bitspace, which visits every ...
Paŭlo Ebermann's user avatar
0 votes
0 answers
101 views

Can we combine two AES (with block size 128) to to a block cipher with a block size 192 which is collision-resistant?

Encrypting values with AES we only need about $2^{64}$ trials until we finding an already used value (some collision). This can be done these days with easy. To make this harder can we combine two AES ...
J. Doe's user avatar
  • 453
0 votes
1 answer
47 views

Format preserving numbers within an offset range?

Very short question. Is it possible to encrypt a sequence of numbers with FPE in a range 10 000 to n where the possible encrypted values are offset and can only fall within the range 10 000 to n? Eg. ...
spurtin's user avatar
2 votes
1 answer
106 views

Publicly verify that a a ticket was issued by an authority with around 8 digits

Im building a backend for webapp(s), so that we can sell tickets for our events. The events ranges from 100-700 guests. We sell tickets online and we would like to be able to scan the tickets at the ...
Alex's user avatar
  • 21
5 votes
1 answer
349 views

What is the best way to pseudonymise IP addresses while retaining the ability to identify those that share a subnet?

Background: I'm developing an app that is based around registered users voting on stuff, and I want to create a heuristic that involves IP addresses as one way to flag accounts for further ...
Inkling's user avatar
  • 161
1 vote
1 answer
99 views

How internal functions are defined for FF3?

I have seen FF1/FF3 being said that they preserve the same format as that of the plaintext. For example, if I encrypt a decimal number 1234 then its encrypted value is also a 4 digit decimal number. ...
Novice_researcher's user avatar
1 vote
1 answer
72 views

Are there on-line ways to use a block cipher to generate unique $n$ bits that guarantee collision-freeness for $2^n$ times?

$n$ is a run-time variable chosen each time the user runs the implementation. One way I can think is to use any block cipher, say AES, as a seeded CSPRNG to randomly shuffle list of numbers $0, 1, \...
caveman's user avatar
  • 573
2 votes
0 answers
69 views

Provably Secure FPEs vs Practically Used FPEs

I have just checked a few FPE schemes like "Swap-or-not", "Mix-and-cut" which are provably secure. What techniques do the provably secure FPE scheme provably secure? The FPE ...
Novice_researcher's user avatar
1 vote
0 answers
618 views

FF1 vs FF3 FPE Encryption

FF1 and FF3 both are Feistel-based FPE schemes with r=10 rounds and 8 rounds respectively. The other difference I got to know is that the FF1 considers the right half of the message bigger while FF3 ...
Novice_researcher's user avatar
2 votes
0 answers
72 views

Why FF2 Format Preserving Encryption Fails

I have just seen that there are 3 feistel based FPE schemes which were proposed FF1,FF2 and FF3( There might be many more). Although there have been different attacks on FF1 and FF3 standard that ...
Novice_researcher's user avatar
0 votes
0 answers
406 views

Any number-to-number cipher?

I am curious (not technically informed) if the number-to-number cipher is common/useful in cryptography. Imagine, we want to cipher integer y to integer ...
Googlebot's user avatar
  • 101
2 votes
2 answers
460 views

FPE Limitations and Scope of FPE

Do you think the format preserving encryption(FPE) schemes have any limitation with respect to other conventional block ciphers? Do FPE have a wide range of applications to be a future research area?
Novice_researcher's user avatar
2 votes
1 answer
639 views

Format Preserving Hash Function

We have a use case of tokenising the credit card information and returning a tokenised value after preserving the format. Ideally this should be one way, and following a FPE might not be the best ...
user3336696's user avatar
1 vote
0 answers
203 views

FF1 comparison with FF3

I have seen the FF1 and FF3 Format preserving encryption. There are certain differences with respect to a number of rounds and while using the unbalanced Feistel network. What makes it different for ...
Novice_researcher's user avatar
0 votes
1 answer
118 views

One way text→text function

I need a way to map some printable text to other printable text. E.g.: Ian BoydKcp Zbas Notice some of the important ...
Ian Boyd's user avatar
  • 1,001
1 vote
0 answers
55 views

encryption tokenization for credit card [closed]

I have put in place a solution for a cryptographic tokenization engine for credit-card numbers. You can find it under the following repository. In the implementation I tried to respect some ...
Rodrigo Broggi's user avatar
1 vote
0 answers
310 views

Test vectors for FF1/FF3-1

I'm working on a C implementation of the FF1 and FF3-1 format-preserving encryption algorithms, here. For FF1, NIST provides test vectors, here; however, none of the test vectors is crafted such that <...
John Tyner's user avatar
2 votes
1 answer
78 views

Is there any block-cipher, format-preserving or similar encryption method with known cycle size? (without short-cut, with known source/runtime vars)

E.g. given a $n$-bit message $m_0$ and an encryption function $f$ After applying the function $c$ times it will result in $m_0$ again. $f^1(m_0) = f(m_0) = m_1$ $f^2(m_0) = f(f(m_0)) = f(m_1) = m_2$ .....
J. Doe's user avatar
  • 453
2 votes
1 answer
375 views

Unbalanced numeric Feistel network implementation

After reading a comprehensive paper [1] covering various kinds of generalized Feistel networks, I've tried to implement the Unbalanced Numeric Feistel variant, which relies on modular arithmetic for ...
0x2b3bfa0's user avatar
  • 123
0 votes
1 answer
136 views

The modes of encryption that preserve the format

Can anyone give me some documentation on the various format preserving encryption modes?
dang son's user avatar
1 vote
1 answer
79 views

Integrity of format preserving Encryption

In this question regarding integrity of FPE, the main point of the answer is that: FFX is not malleable. [...] FFX can provide integrity protection in very limited circumstances. So I was ...
Marc Ilunga's user avatar
  • 3,188
1 vote
2 answers
116 views

Format Preserving Encyption question

I've got a theorical question from an exercise. Here it is: --- Exercise beginning --- There are ways to convert a block cypher onto an FPE. One of them is the following: Let $E_{k}$ a ...
Flama's user avatar
  • 63
1 vote
1 answer
122 views

Splitting text before Format Preserving Encryption operation

What is the effect on Format Preserving Encryption security if I reorder text before FPE encryption? Take as an example Canadian postal codes (letter-digit-letter digit-letter-digit): Parliment: K1A ...
ixe013's user avatar
  • 139
2 votes
2 answers
1k views

Very short block ciphers for equally-short plaintexts

I'm trying to develop an encryption technique for encrypting short phrases (such as reversibly-anonymized names) in text. The key-generation and ciphertext-representation details are fungible, but ...
Stuart P. Bentley's user avatar
0 votes
0 answers
56 views

Encryption of 7 byte of data, output must be 7 byte [duplicate]

I'm looking for a cryptographic algorithm that inputs and outputs are both 7 bytes. Is there any such algorithm?
Robin Yu's user avatar
0 votes
1 answer
118 views

Format Preserving Encryption - Generating coupon codes

If I use cycle FPE with AES to generate 20 digit coupon codes, what is the probability that an attacker could generate a valid coupon?
Julian's user avatar
  • 1
7 votes
0 answers
144 views

FPE current state of art for "small" domains

Is there any survey with the state of art treatment of format-preserving encryption for small domains (i.e. 2^20 for example)? I believe that Stalling's and Rogaway's surveys are out of date due to ...
Kirill Tsar.'s user avatar
3 votes
0 answers
59 views

1-digit MAC with error-catching properties?

The well-known Luhn check digit (used in credit-card numbers) is a public method to append a check digit on the right of a decimal number, so that any 1-digit alteration and any exchange of two (...
fgrieu's user avatar
  • 141k
7 votes
1 answer
561 views

Does Format Preserving Encryption have significant advantages over a randomly generated lookup table?

I have a need to anonymise phone numbers so that I can carry out testing and analysis work on telecoms data sets and comply with GDPR. I typically receive a batch of a few hundred thousand events ...
sumidid's user avatar
  • 73
2 votes
1 answer
1k views

How to encrypt email address using FPE?

Could anyone guide me on how to implement FPE (Format Preserving Encryption) for Email address masking? For example: if my ID is [email protected] then it should ...
user65343's user avatar
1 vote
0 answers
86 views

Locally computable random permutation

Let $A$ be a set of size $n$. Given a random seed $s$, I am looking to build a pseudo-random random permutation $\pi_s: A \rightarrow A$ such that $\pi_s(a)$ is fast to compute for every $a \in A$. By ...
Randomblue's user avatar
1 vote
1 answer
817 views

How can I create a block cipher of a reduced size given a fixed length block cipher? [duplicate]

I've been reading papers on variable sized block cipher constructions based on fixed-length block ciphers, and they tend to focus on increasing the block size. They either gloss over or speak too ...
Daffy's user avatar
  • 2,399
1 vote
1 answer
283 views

Is there a construction for a variable length block cipher that uses a fixed length one?

I'm looking for some way to take a fixed length block cipher (for example AES) and turn it into a variable length one with comparable security. The new length may be bigger or smaller than the ...
Daffy's user avatar
  • 2,399
3 votes
1 answer
142 views

Does the timing of cycle-walking pose a threat?

Cycle-walking is a technique for format-preserving encryption that involves repeating an encryption process until the result is inside a desired range. For example, given an input P, a range R, and ...
Daffy's user avatar
  • 2,399
0 votes
2 answers
264 views

Format Preserving Encryption after compression algorithm?

I have large data set which has sensitive information. I want to encrypt different parts of it with different keys. There is also need for compression as data is very large (100s of GB that has to be ...
kneelb4darth's user avatar
1 vote
1 answer
1k views

which en/decrypt algorithm should use for small byte array that result have same length

I wanted to use Rijndael for encrypting big array of bytes, as you know this algorithm will add up to 15 byte to result (if you use block with length equal to 16). ...
user47044's user avatar
5 votes
2 answers
2k views

Can you help me understand Format Preserving Encryption?

I came across the definition of format-preserving encryption (FPE) as first defined in a seminal paper by Black and Rogaway. Based on their paper, FPE (or prefix cipher) is defined as follows (quoted ...
Hashed's user avatar
  • 185
1 vote
2 answers
3k views

Want to generate numeric coupon codes?

We want to generate coupon code series and then encrypt those coupon code in numeric only, and that must also be decipherable. We will be sharing encrypted code as coupon code with customer. These ...
murtaza.webdev's user avatar
7 votes
1 answer
143 views

State of the art low memory arbitrary-domain PRP?

I am wondering what the state of the art is on low memory arbitrary-domain PRPs. That is, I'm looking for an algorithm that implements bijective function $PRP : \mathbb{Z}_n \times \{0, 1\}^b \...
orlp's user avatar
  • 4,250
1 vote
0 answers
545 views

Format Preserving Encryption FF1 Samples

NIST published methods for Format-Preserving Encryption and there is a link in the document giving examples for FF1 methods. I am confused by the value of R given in the examples. $R$ is the output ...
longcpp's user avatar
  • 11
-3 votes
1 answer
216 views

Format preserving encryption

Can format preserving encryption be used for any other applications than Credit card, pan card or social security numbers? If, could you provide a few examples for my further research on the topic?
Seetha Neelagandan's user avatar
1 vote
1 answer
168 views

Encrypting a string as smaller pieces vs. encrypting it as a whole

Is there any difference between these two ways to encrypt a string using FPE? Say the string has the format is specified by this rule First part is in the set $S = \{\text{AA,AB,AC,BA,BB,BC,CA,CB,CC}...
erotavlas's user avatar
  • 507
1 vote
1 answer
110 views

Is this the correct procedure for cycle walking using an FPE?

To encrypt a value from a set (say a range of years from 1001 to 2001) Rank the set {0 = 1001, 1 = 1002, 2 = 1003...999 = 2001} Take the value you want to encrypt from the set (year = 1995) and ...
erotavlas's user avatar
  • 507
0 votes
1 answer
168 views

Can BPS be used to encrypt a single integer, and restrict the output to a certain range?

As per specifications document, "We have the natural restriction that at least two characters must be ciphered, i.e. $b \geq 2$" where each character is represented by an integer of certain ...
erotavlas's user avatar
  • 507
3 votes
2 answers
1k views

Best modern cipher for morse code?

I am looking for a modern cipher to encode morse code, ie. input is [A-Z 0-9] (base36 as I learned in the comments below) and output is the same, one character at a ...
Christian's user avatar
  • 163