Format-preserving tokenization
A computer system according to embodiments can retrieve untokenized data and identify tokenizing data elements and non-tokenizing data elements. The computer system can generate dummy data and a cryptographic key using the untokenized data. The computer system can then generate a format-preserving token by encrypting the dummy data using the cryptographic key. The computer system can insert the non-tokenizing characters into the format-preserving token. The computer system can perform further processing on the format-preserving token, including storing the format-preserving token in a token vault.
1 . A method comprising:
retrieving, by a computer system, untokenized data;
generating, by the computer system, dummy data corresponding to the untokenized data;
generating, by the computer system, a cryptographic key using the untokenized data and a key generation method;
encrypting, by the computer system, the dummy data using the cryptographic key and a format-preserving encryption method, thereby generating a format-preserving token corresponding to the untokenized data; and
performing additional processing using the format-preserving token, the additional processing comprising one or more of (a) storing the format-preserving token in a token vault, (b) transmitting the format-preserving token to a client computer or another external entity, or (c) performing a private data analysis using the format-preserving token.
2 . The method of claim 1 , wherein the format-preserving encryption method comprises a Feistel-based format-preserving encryption method.
3 . The method of claim 1 , wherein the computer system encrypts the dummy data using a tweak value in addition to the cryptographic key, and wherein the method further comprises: retrieving, by the computer system, the tweak value.
4 . The method of claim 1 , wherein the untokenized data comprises a first sequence of data elements, wherein generating the dummy data corresponding to the untokenized data comprises:
determining, by the computer system, a length of the first sequence of data elements, wherein the length of the first sequence of data elements is equal to a number of data elements in the first sequence of data elements;
determining, by the computer system, a dummy data element; and
generating, by the computer system, the dummy data based on the length of the first sequence of data elements and the dummy data element by generating a second sequence of data elements comprising a plurality of repeating instances of the dummy data element, wherein a length of the second sequence of data elements is equal to the length of the first sequence of data elements, wherein the dummy data comprises the second sequence of data elements.
5 . The method of claim 1 , wherein the key generation method includes a hashing method.
6 . The method of claim 1 , wherein the key generation method comprises a secure hashing algorithm (SHA), and wherein the cryptographic key comprises a hash generated using the untokenized data as an input to the secure hashing algorithm.
7 . The method of claim 1 , wherein:
the untokenized data comprises an untokenized string comprising a plurality of untokenized characters;
the plurality of untokenized characters correspond to one or more character sets;
the format-preserving token comprises a format-preserving token string comprising a plurality of tokenized characters; and
the plurality of tokenized characters correspond to the one or more character sets.
8 . The method of claim 7 , wherein the one or more character sets comprise one or more of the following:
one or more sets of numeric digits;
one or more alphabets;
one or more sets of logograms;
one or more sets of symbols associated with one or more syllabaries;
one or more sets of typographical symbols; and
one or more other symbols.
9 . The method of claim 1 , wherein:
the untokenized data is associated with one or more data types;
the one or more data types are associated with one or more respective data formats; and
the format-preserving token is formatted in accordance with the one or more respective data formats.
10 . The method of claim 9 , wherein the one or more data types include one or more of the following:
one or more segments of text;
one or more names;
one or more numbers; and
one or more dates.
11 . The method of claim 1 , wherein the cryptographic key comprises a first cryptographic key, and wherein performing the additional processing using the format-preserving token comprises:
encrypting, by the computer system, the untokenized data using a second cryptographic key, thereby generating encrypted untokenized data; and
storing, by the computer system, the format-preserving token in the token vault in association with the encrypted untokenized data.
12 . The method of claim 1 , wherein performing the additional processing using the format-preserving token comprises transmitting the format-preserving token to the client computer.
13 . The method of claim 1 , wherein performing the additional processing using the format-preserving token comprises:
retrieving, by the computer system, a dataset associated with the format-preserving token;
retrieving, by the computer system, one or more other format-preserving tokens;
retrieving, by the computer system, one or more other datasets associated with the one or more other format-preserving tokens; and
performing, by the computer system, the private data analysis on the dataset, the one or more other datasets, the format-preserving token, and the one or more other format-preserving tokens, thereby producing a data analysis result.
14 . The method of claim 1 , wherein the untokenized data comprises a sequence of untokenized data elements comprising a plurality of untokenized data elements, wherein the plurality of untokenized data elements includes one or more tokenizing data elements and one or more non-tokenizing data elements, and wherein generating the dummy data corresponding to the untokenized data comprises:
identifying, by the computer system, the one or more tokenizing data elements;
determining, by the computer system, a dummy data element; and
generating, by the computer system, a sequence of dummy data elements comprising a number of repeating instances of the dummy data elements equal to a number of tokenizing data elements in the one or more tokenizing data elements, wherein the dummy data comprises the sequence of dummy data elements.
15 . The method of claim 14 , wherein the untokenized data comprises an account number.
16 . The method of claim 14 , wherein encrypting the dummy data using the cryptographic key and the format-preserving encryption method, thereby generating the format-preserving token corresponding to the untokenized data comprises:
encrypting, by the computer system, the dummy data using the cryptographic key, thereby generating an initial format-preserving token, wherein the initial format-preserving token comprises an initial format-preserving token sequence;
identifying, by the computer system, the one or more non-tokenizing data elements and one or more non-tokenizing data element locations; and
inserting, by the computer system, the one or more non-tokenizing data elements into the initial format-preserving token sequence based on the one or more non-tokenizing data element locations, thereby producing an updated format-preserving token sequence, wherein the format-preserving token comprises the updated format-preserving token sequence.
17 . The method of claim 14 , wherein the one or more non-tokenizing data elements comprise one or more delimiters associated with one or more data types of the untokenized data.
18 . The method of claim 14 , wherein:
the untokenized data comprises an identification number.
19 . A computer system comprising:
one or more processors; and
a non-transitory computer readable medium coupled to the one or more processors, the non-transitory computer readable medium comprising instructions that, when executed by the one or more processors, cause the computer system to perform a method comprising:
retrieving untokenized data;
generating dummy data corresponding to the untokenized data;
generating a cryptographic key using the untokenized data and a key generation method;
encrypting the dummy data using the cryptographic key and a format-preserving encryption method, thereby generating a format-preserving token corresponding to the untokenized data; and
performing additional processing using the format-preserving token, the additional processing comprising one or more of (a) storing the format-preserving token in a token vault. (b) transmitting the format-preserving token to a client computer or another external entity, or (c) performing a private data analysis using the format-preserving token.
20 . The computer system of claim 19 , wherein the format-preserving token is a format-preserving payment token.