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
1
vote
2answers
55 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 ...
0
votes
0answers
33 views

How to encrypt a small number of identities (which are related to each other)? / Which algorithm has the smallest bit-length?

I'm looking for an encryption with as small numbers as possible. Given a small group of identities ($G$) (e.g. numbers from $1$ to $N$). Given one entry (or a small number) $e_i$ allows to compute ...
0
votes
0answers
43 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?
0
votes
1answer
62 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?
5
votes
0answers
58 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 ...
3
votes
0answers
53 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 (...
6
votes
1answer
282 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 ...
2
votes
1answer
172 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 Poornima1@gmail.com then it should ...
1
vote
0answers
64 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 ...
0
votes
1answer
321 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 ...
1
vote
1answer
64 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 ...
3
votes
1answer
105 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 ...
0
votes
2answers
197 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 ...
0
votes
1answer
781 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). ...
5
votes
2answers
996 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 ...
0
votes
2answers
2k 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 ...
7
votes
1answer
111 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 \...
1
vote
0answers
447 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 ...
-3
votes
1answer
165 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?
1
vote
1answer
149 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}...
1
vote
1answer
74 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 ...
0
votes
1answer
133 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 ...
3
votes
2answers
688 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 ...
1
vote
1answer
221 views

Algorithm to transform plaintext to a key of desired keysize, when using input plaintext as key for FPE?

Using a format preserving encryption scheme that uses AES internally as its block cipher, for a plaintext that I encrypt I want to use that input plaintext as the key. However using AES-128, my ...
0
votes
0answers
53 views

Is a timing side channel attack effective when the leaked information is related to the result of a hash?

I'm writing a function to act as a cryptographic hash of a number within a range that returns another number of the same range. The catch is that the result needs to have certain properties. I run a ...
1
vote
0answers
470 views

Encrypting a 160-bit plaintext into a 160 bit ciphertext with a 128-bit Block Cipher [closed]

So I have a kind of interesting issue. I have a field in my data store which must take exactly 160 bits of information. Some users will choose to make this data encrypted, some won't, so some of those ...
1
vote
1answer
793 views

How to use AES correctly in BPS Format Preserving Encryption

I have several questions on using AES 128bit in the BPS format preserving encryption Which modes are acceptable? (Should the block cipher used at each round be deterministic (ECB) or probabilistic (...
2
votes
1answer
251 views

Why is the tweak length 64bit in BPS FPE algorithm?

In the algorithm for BPS Format Preserving Encryption Is this tweak always the same length (64bit)? Why did they choose the length 64bit for the tweak?
1
vote
1answer
2k views

Is there a way to encrypt an integer within an arbitrary range?

I need an algorithm that can take an integer, an arbitrary range, a key of 16/24/32 bytes, and an initialization vector of 16 bytes(ideally), and return an integer in the same range. My latest attempt ...
2
votes
1answer
38 views

What are the number of output bits of the internal function F used in BPS algorithm?

In the BPS specification document it says We denote by f the number of output bits of the internal function F What is this if the internal function is AES? Would it be the block size (e.g. 128)?
3
votes
1answer
615 views

How can AES + cycle walking be used as an FPE?

I'm a bit confused after reading several articles that seem to provide conflicting information. Basically I was wondering if AES by itself can be used as an FPE? And if so is this something ...
10
votes
3answers
2k views

Is there an encryption format that preserves length and only outputs alphanumerics?

I'm trying to design a promo code system for a server app I'm designing. Basically, I generate a promo code for a certain item and give the code out to someone, who then types it into the server. ...
4
votes
1answer
610 views

Using a hash (like SHA-256) vs AES as the source for pseudo-random values in Feistel network?

This question is in relation to Wikipedia article on Format Preserving Encryption It says the following It is also possible to make a FPE algorithm using a Feistel network. A Feistel network ...
1
vote
0answers
67 views

Concepts for realization in applied cryptography [closed]

I'm a computer science student (not a mathematican) and I'm gonna to write a master degree diploma on applied cryptography. Specifically, I'd like to create a realization of some cryptographic stuff ...
1
vote
2answers
78 views

Validate per round rather than cycle-walking in FPE

I was thinking about FPE specifically for numbers, CC, phone, SS #, etc. and I thought of some small "optimization" that could be implemented. Can I validate the string length after each round in the ...
2
votes
2answers
5k views

How to encrypt dates using format preserving encryption and avoid collisions

I'm encrypting with an FPE algorithm in C#. What I did is convert the date I want to encrypt to the day of year value and a year value like so. ...
1
vote
0answers
161 views

FFX Encryption over alphabet of arbitrary radix

I understand how standard numeric FPE using a halved string in cycled Feistel networks is constructed and operates. I then read the paper regarding FFX encryption which should allow for any non-binary ...
2
votes
1answer
173 views

SPI security of FE1 scheme

I have a question about security of FE1(Page 16-18) in paper "format preserving encryption". Can anyone explain me, why we are allowed to replace PRF with random function in security proof? And also, ...
3
votes
1answer
465 views

security in format preserving encryption

In format preserving encryption an attacker knows the format and data type of the plain text. The format of the plain text and cipher text are same. usually cipher text are unreadable form. then how ...
1
vote
1answer
149 views

What is a good way to handle longer strings using FPE?

While experimenting with this FPE based on FE1 http://botan.randombit.net/manual/fpe.html (well actually a port of it in C#) I found when the string length gets too long (number of characters N) ...
2
votes
1answer
163 views

Defining format-preserving encryption for natural language

Assume we have plaintext in natural language. Can we use format-preserving encryption in such a way that the produced ciphertext cannot be distinguished from natural language?
3
votes
1answer
307 views

Format preserving encryption FFX

In FFX mode the format of the ciphertext is same as plaintext. How does it ensure data integrity and authentication? Is there any bit flip attack in FFX mode? Is it malleable?
2
votes
1answer
340 views

How to select a 'tweak' used in FE1 mode format preserving encryption?

I'm experimenting with this library Botan which includes a module for format preserving encryption based on FE1 mode. The parameters for the Encrypt method are as follows ...
1
vote
2answers
605 views

Integer encryption preserving equality

I have read too many different options for encryption that I now feel quite lost. I need a simple, secure (don't we all) scheme for encrypting integers (32-bit) with the following requirements: ...
1
vote
1answer
938 views

Super-simple encryption of short strings

I want to anonymise the initials of experiment participants by giving each a pseudonymic set of initials, by encrypting their true initials. Their initials are only two or three letters in length. ...
4
votes
2answers
196 views

Coding of unsigned int to prevent guessing next ID

Suppose we are assigning records an unsigned integer ID from a N-bit space (say 32-bit) in a sequential manner. Is there a way we can code this ID before showing it to the public such that someone can'...
9
votes
1answer
1k views

Is there a format preserving cryptographically secure hash?

I want a way to 'scramble' strings (like words, names) in a predictable way but I don't ever want to (myself or anyone else) be able to 'unscramble' the strings. I found that perhaps what I am ...
3
votes
1answer
722 views

Is format preserving encryption suitable for use with words or names?

Is it possible to use FPE to encrypt names and language words like 'Bob' 'the' 'tree', in order to preserve both length and format (like keeping characters within a certain range like A-Z a-z) The ...
0
votes
2answers
694 views

Are all block ciphers FPE (format preserving encryption)?

A FPE preserves the format. There is a correspondence between the format of the ciphertext and the plaintext. Given that a message in some binary enconded format can easily be divded in some ...
9
votes
3answers
1k views

What is the most computationally efficient way of generating pseudo-random permutations?

I have an application in which I need to create up to J randomly shuffled-copies of an array of length N. Then I will have millions or even billions of iterations such that, in each iteration, I will ...