Page 1 Seite 1
NIST Special Publication 800-38G NIST Special Publica 800-38G
Draft Entwurf
Recommendation for Block Cipher Empfehlung für Block Cipher
Modes of Operation: Betriebsarten:
Methods for Format-Preserving Methoden zur Erhaltung Format-
Encryption Verschlüsselung
Morris Dworkin Morris Dworkin
COMPUTER COMPUTER
SECURITY SICHERHEIT

Page 2 Seite 2

Page 3 Seite 3
NIST Special Publication 800-38G NIST Special Publica 800-38G
Draft Entwurf
Recommendation for Block Cipher Empfehlung für Block Cipher
Modes of Operation: Betriebsarten:
Methods for Format-Preserving Methoden zur Erhaltung Format-
Encryption Verschlüsselung
Morris Dworkin Morris Dworkin
Computer Security Division Computer Security Division
Information Technology Laboratory Laboratorium für Informationstechnologie
July, 2013 Juli 2013
US Department of Commerce US Department of Commerce
Cameron F. Kerry, Acting Secretary Cameron F. Kerry, Stellvertretender Sekretär
National Institute of Standards and Technology National Institute of Standards and Technology
Patrick D. Gallagher, Under Secretary of Commerce for Standards and Technology and Director Patrick D. Gallagher, Under Secretary of Commerce for Standards and Technology und Direktor

Page 4 Seite 4
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
ii ii
Authority Behörde
This publication has been developed by NIST to further its statutory responsibilities under the Diese Veröffentlichung wurde von NIST entwickelt worden, um seine gesetzlichen Aufgaben im Rahmen der weiteren
Federal Information Security Management Act (FISMA), Public Law (PL) 107-347. Federal Information Security Management Act (FISMA), Öffentliches Recht (PL) 107-347. NIST is NIST ist
responsible for developing information security standards and guidelines, including minimum für die Entwicklung von Informationssicherheitsstandards und Richtlinien, einschließlich der Mindest verantwortlich
requirements for Federal information systems, but such standards and guidelines shall not apply Anforderungen für die Bundesinformationssysteme, aber solche Normen und Richtlinien gelten nicht
to national security systems without the express approval of appropriate Federal officials für die nationale Sicherheit, ohne die ausdrückliche Zustimmung des entsprechenden Bundesbeamte
exercising policy authority over such systems. Ausübung Politik Autorität über solche Systeme. This guideline is consistent with the requirements Diese Richtlinie steht im Einklang mit den Anforderungen
of the Office of Management and Budget (OMB) Circular A-130, Section 8b(3), Securing des Office of Management and Budget (OMB) Circular A-130, § 8b (3), Sicherung
Agency Information Systems , as analyzed in Circular A-130, Appendix IV: Analysis of Key Agentur Information Systems, wie im Rundschreiben A-130, Anhang IV analysiert: Analyse von Key
Sections . Abschnitte. Supplemental information is provided in Circular A-130, Appendix III, Security of Ergänzende Informationen sind im Rundschreiben A-130, Anhang III, der Sicherheit der vorgesehenen
Federal Automated Information Resources . Bundesautomated Information Resources.
Nothing in this publication should be taken to contradict the standards and guidelines made Nichts in dieser Publikation werden sollten, um die Standards und Richtlinien vorgenommen werden widersprechen
mandatory and binding on Federal agencies by the Secretary of Commerce under statutory obligatorisch und verbindlich auf Bundesbehörden von der Handelsminister im Rahmen der gesetzlichen
authority. Autorität. Nor should these guidelines be interpreted as altering or superseding the existing Auch sollten diese Richtlinien als Veränderung oder verdrängen die vorhandene interpretiert werden
authorities of the Secretary of Commerce, Director of the OMB, or any other Federal official. Behörden der Handelsminister, Direktor des OMB, oder einem anderen Bundesbeamten.
This publication may be used by nongovernmental organizations on a voluntary basis and is not Diese Publikation kann von Nicht-Regierungsorganisationen auf freiwilliger Basis verwendet werden und ist nicht
subject to copyright in the United States. unterliegen dem Urheberrecht in den Vereinigten Staaten. Attribution would, however, be appreciated by NIST. Zuschreibung würde jedoch durch NIST geschätzt.
National Institute of Standards and Technology Special Publication 800-38G National Institute of Standards and Technology Special Publica 800-38G
Natl. Natl. Inst. Inst. Stand. Stehen. Technol. Technol. Spec. Spec. Publ. Publ. 800-38G, NNN pages (Month YYYY) 800-38G, NNN Seiten (Monat JJJJ)
http://dx.doi.org/10.6028/NIST.SP.XXX http://dx.doi.org/10.6028/NIST.SP.XXX
CODEN: NSPUE2 CODEN: NSPUE2
Public comment period: Month Day, YYYY through Month Day, YYYY Frist für öffentliche Stellungnahmen: Monat Tag, Monat JJJJ durch Tag, JJJJ
National Institute of Standards and Technology National Institute of Standards and Technology
Attn: Computer Security Division, Information Technology Laboratory Aufmerksamkeit: Computer Security Division Laboratorium für Informationstechnologie
100 Bureau Drive (Mail Stop 8930) Gaithersburg, MD 20899-8930 100 Büro-Laufwerk (Poststelle 8930) Gaithersburg, MD 20899-8930
Email: EncryptionModes@nist.gov E-Mail: EncryptionModes@nist.gov
Certain commercial entities, equipment, or materials may be identified in this document in order to Bestimmte gewerbliche Einrichtungen, Geräten oder Materialien können in diesem Dokument, um identifiziert werden
describe an experimental procedure or concept adequately. beschreiben ein experimentelles Verfahren oder Konzept angemessen. Such identification is not intended to imply Eine solche Identifizierung ist nicht beabsichtigt, zu implizieren,
recommendation or endorsement by NIST, nor is it intended to imply that the entities, materials, or Empfehlung oder Billigung durch NIST, noch ist es zu verstehen, dass die Einrichtungen, Materialien oder
equipment are necessarily the best available for the purpose. Geräte sind unbedingt die beste zur Verfügung für den Zweck.
It is possible that implementation of modes included in this NIST Recommendation may involve an Es ist möglich, dass die Umsetzung von Modi in diesem NIST Empfehlung enthalten kann ein einzubeziehen
invention covered by patent rights. Erfindung von Patentrechten abgedeckt. By publication of this Special Publication, no position is taken with Durch Veröffentlichung dieser Sonderveröffentlichung, wird keine Position genommen
respect to the validity, scope or enforceability of any claim(s) of any such patent rights in connection in Bezug auf die Gültigkeit, Umfang oder Durchsetzbarkeit der Forderung (en) solcher Patentrechte im Zusammenhang
with such implementation. mit solchen Umsetzung. If a patent holder has filed with NIST a Letter of Assurance (LOA) with Wenn ein Patentinhaber hat mit NIST einen Letter of Assurance (LOA) mit eingereicht
respect to any such patent rights, a copy of that LOA may be obtained from NIST. hinsichtlich dieser Patentrechte, kann eine Kopie dieser LOA von NIST erhalten werden.
There may be references in this publication to other publications currently under development by NIST Es kann Verweise in dieser Veröffentlichung auf anderen Publikationen derzeit in der Entwicklung von NIST sein
in accordance with its assigned statutory responsibilities. in Übereinstimmung mit dem zugewiesenen gesetzlichen Aufgaben. The information in this publication, including Die Informationen in dieser Veröffentlichung, einschließlich
concepts and methodologies, may be used by Federal agencies even before the completion of such Konzepte und Methoden, können durch Bundesstellen noch vor der Fertigstellung der solche verwendet werden
companion publications. Begleiter Publikationen. Thus, until each publication is completed, current requirements, guidelines, So, bis jeder Veröffentlichung abgeschlossen ist, aktuellen Anforderungen, Richtlinien,
and procedures, where they exist, remain operative. und Verfahren, wo es sie gibt, bleiben in Betrieb. For planning and transition purposes, Federal Für die Planung und die Überleitung, Bundes
agencies may wish to closely follow the development of these new publications by NIST. Agenturen möge sich eng an die Entwicklung dieser neuen Publikationen von NIST.
Organizations are encouraged to review all draft publications during public comment periods and Organisationen sind aufgefordert, alle Veröffentlichungen Entwurf bei öffentlichen Kommentar Prüfungszeiträume und
provide feedback to NIST. Feedback auf NIST. All NIST Computer Security Division publications, other than the ones Alle NIST Computer Security Abteilung Publikationen, andere als die
noted above, are available at http://csrc.nist.gov/publications. oben angemerkt, sind bei http://csrc.nist.gov/publications.

Page 5 Seite 5
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
iii iii
Reports on Computer Systems Technology Berichte über Computer-Systemtechnik
The Information Technology Laboratory (ITL) at the National Institute of Standards and Die Information Technology Laboratory (ITL) am National Institute of Standards and
Technology (NIST) promotes the US economy and public welfare by providing technical Technologie (NIST) fördert die US-Wirtschaft und der öffentlichen Wohlfahrt durch die Bereitstellung technischer
leadership for the Nation's measurement and standards infrastructure. Führung für die Messung und Standards Infrastruktur des Landes. ITL develops tests, test ITL entwickelt Tests, Test
methods, reference data, proof of concept implementations, and technical analyses to advance Methoden, Referenzdaten, Proof of Concept-Implementierungen, und technische Analysen voran
the development and productive use of information technology. die Entwicklung und der produktiven Nutzung der Informationstechnologie. ITL's responsibilities include the Verantwortlichkeiten ITL gehören die
development of management, administrative, technical, and physical standards and guidelines for Entwicklung von Management-, Verwaltungs-, technischen und physischen Standards und Richtlinien für
the cost-effective security and privacy of other than national security-related information in Die wirtschaftliche Sicherheit und Privatsphäre von anderen als nationalen sicherheitsrelevante Informationen in
Federal information systems. Bundesinformationssysteme. The Special Publication 800-series reports on ITL's research, Der Sonderveröffentlichung 800-Serie Berichte über ITL-Forschung,
guidelines, and outreach efforts in information system security, and its collaborative activities Richtlinien und Outreach-Bemühungen in der Informationssystemsicherheit und ihre gemeinsamen Aktivitäten
with industry, government, and academic organizations. mit der Industrie, Regierung und akademischen Organisationen.
Abstract Abstrakt
This Recommendation specifies three methods for format-preserving encryption, called FF1, Diese Empfehlung gibt drei Methoden zum Format erhalt Verschlüsselung, genannt FF1,
FF2, and FF3. FF2, FF3 und. Each of these methods is a mode of operation of the AES algorithm, which is used Jedes dieser Verfahren ist eine Betriebsart des AES-Algorithmus, der verwendet wird,
to construct a round function within the Feistel structure for encryption. eine Runde Funktion innerhalb der Feistel-Struktur für die Verschlüsselung zu konstruieren.
Keywords Stichworte
block cipher; Blockchiffre; computer security; Computer-Sicherheit; confidentiality; Vertraulichkeit; cryptography; Kryptographie; encryption; Verschlüsselung; Feistel structure; Feistel-Struktur;
format-preserving encryption; Format erhalt Verschlüsselung; information security; Informationssicherheit; mode of operation. Betriebsart.
Acknowledgements Danksagung
Much of the text in this publication is adapted from four specification documents that were Viel von dem Text in dieser Publikation wird aus vier Spezifikationsdokumente, die angepasst wurden
submitted to NIST: Mihir Bellare, Phil Rogaway, and Terence Spies submitted the FFX NIST vorgelegt: Mihir Bellare, Phil Rogaway und Terence Spies hat die FFX
framework and FFX[Radix] in [1 ] a nd [2]; Rahmen und FFX [Radix] in [1 ] ein nd [2]; Eric Brier, Thomas Peyrin, and Jacques Stern Eric Brier, Thomas Peyrin, und Jacques Stern
submitted BPS in [3] , and Joachim Vance submitted VAES3 in [13]. eingereicht BPS in [3] , und Joachim Vance eingereicht VAES3 in [13].
In addition to the designers, the author wishes to thank his colleagues who reviewed drafts of this Neben den Designer, der Autor möchte seine Kollegen, die Entwürfe der diese Bewertung danke
publication and contributed to its development, especially Elaine Barker, Meltem Somnez Turan, Veröffentlichung und zu seiner Entwicklung, vor allem Elaine Barker, Meltem Somnez Turan beigetragen,
Lily Chen, John Kelsey, Ray Perlner, Allen Roginsky, Lawrence Bassham, Tim Hall, and Sharon Lily Chen, John Kelsey, Ray Perlner, Allen Roginsky, Lawrence Bassham, Tim Hall, und Sharon
Keller. Keller. The author also gratefully acknowledges the comments from the public and private Der Autor bedankt sich auch die Kommentare aus dem öffentlichen und privaten
sectors to improve the quality of this publication. Sektoren, um die Qualität dieser Publikation zu verbessern.

Page 6 Seite 6
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
iv iv
TABLE OF CONTENTS Inhaltsverzeichnis
1 1
PURPOSE..............................................................................................................................................................1
2 2
AUTHORITY........................................................................................................................................................1
3 3
INTRODUCTION EINFÜHRUNG ................................................................................................................................................1
4 4
DEFINITIONS AND DEFINITIONEN UND NOTATION......................................................................................................................3
4.1 D 4.1 D
EFINITIONS EFINITIONEN
....................................................................................................................................................3
4.2 A 4,2 A
CRONYMS CRONYMS
......................................................................................................................................................5
4.3 O 4.3 O
PERATIONS AND Arbeitsvorgänge und
F F
UNCTIONS UNKTIONEN
.........................................................................................................................5
4.4 E 4.4 D
XAMPLES OF EISPIELE DER
B B
ASIC ASIC
O O
PERATIONS AND Arbeitsvorgänge und
F F
UNCTIONS UNKTIONEN
........................................................................................6 .................................................. ...................................... 6
5 5
PRELIMINARIES................................................................................................................................................8
5.1 C 5.1 C
HARACTER Haracter
S S
TRINGS Trings
......................................................................................................................................8
5.2 U 5.2 U
NDERLYING NDERLYING
B B
LOCK LOCK
C C
IPHER AND Ipher UND
K K
EY EY
...........................................................................................................8
5.3 E 5.3 E
NCRYPTION AND NCRYPTION UND
D D
ECRYPTION Ecryption
F F
UNCTIONS UNKTIONEN
....................................................................................................9
5.4 F 5.4 F
EISTEL Eistel
S S
TRUCTURE UFBAU
......................................................................................................................................10
5.5 C 5.5 C
OMPONENT Ls Bestandteil
F F
UNCTIONS UNKTIONEN
...............................................................................................................................11
6 6
MODE MODE SPECIFICATIONS...............................................................................................................................13
6.1 6.1 FF1................................................................................................................................................................14
6.2 6.2 FF2................................................................................................................................................................16
6.3 6.3 FF3................................................................................................................................................................19
7 7
CONFORMANCE..............................................................................................................................................21
8 8
REFERENCES....................................................................................................................................................21
APPENDIX A: PARAMETER CHOICES ANHANG A: Parameterwahlen ............................................................................................................23
APPENDIX B: SECURITY GOAL ANHANG B: SICHERHEIT ZIEL .........................................................................................................................23
APPENDIX C: ANHANG C: TWEAKS.........................................................................................................................................23
TABLE OF FIGURES TABELLE DER ZAHLEN
Figure 1: Illustration of the Feistel Structure................................................................................ 11 Abbildung 1: Illustration des Feistel-Struktur .......................................... ...................................... 11

Page 7 Seite 7
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
1 Purpose 1 Zweck
This publication is the seventh part in a series of Recommendations regarding the modes of Diese Veröffentlichung ist der siebte Teil in einer Reihe von Empfehlungen in Bezug auf die Modi des
operation of block cipher algorithms. Betrieb von Blockverschlüsselungsalgorithmen. The purpose of this part is to provide approved methods for Der Zweck dieses Teils ist es, bewährte Methoden für bieten
format-preserving encryption (FPE). Format erhalt Verschlüsselung (FPE).
2 Authority 2 Behörde
This publication has been developed by the National Institute of Standards and Technology Diese Veröffentlichung wurde von der National Institute of Standards and Technology entwickelt
(NIST) in furtherance of its statutory responsibilities under the Federal Information Security (NIST) zur Förderung seiner gesetzlichen Aufgaben nach dem Bundesinformationssicherheit
Management Act (FISMA) of 2002, Public Law 107-347. Management Act (FISMA) 2002, Public Law 107-347.
NIST is responsible for developing standards and guidelines, including minimum requirements NIST ist für die Entwicklung von Standards und Richtlinien, einschließlich der Mindestanforderungen verantwortlich
for federal information systems, but such standards and guidelines shall not apply to national für Bundes-Informationssysteme, aber solche Normen und Richtlinien gelten nicht für nationale gelten
security systems. Sicherheitssysteme.
This recommendation has been prepared for use by Federal agencies. Diese Empfehlung wurde für die Nutzung durch Bundesbehörden erstellt. It may be used by Es kann genutzt werden,
nongovernmental organizations on a voluntary basis and is not subject to copyright. Nicht-Regierungsorganisationen auf freiwilliger Basis und unterliegt dem Urheberrecht. (Attribution (Namensnennung
would be appreciated by NIST.) würde durch NIST geschätzt.)
Nothing in this publication should be taken to contradict the standards and guidelines made Nichts in dieser Publikation werden sollten, um die Standards und Richtlinien vorgenommen werden widersprechen
mandatory and binding on federal agencies by the Secretary of Commerce under statutory Pflicht und bindend für Bundesstellen von der Handelsminister im Rahmen der gesetzlichen
authority. Autorität. Nor should these guidelines be interpreted as altering or superseding the existing Auch sollten diese Richtlinien als Veränderung oder verdrängen die vorhandene interpretiert werden
authorities of the Secretary of Commerce, Director of the OMB, or any other federal official. Behörden der Handelsminister, Direktor des OMB, oder jede andere Bundesbeamte.
Conformance testing for implementations of this Recommendation will be conducted within the Konformitätstests für Implementierungen dieser Empfehlung wird in die durchgeführt werden
framework of the Cryptographic Algorithm Validation Program (CAVP) and the Cryptographic Rahmen des Cryptographic Algorithm Validation Program (CAVP) und dem Cryptographic
Module Validation Program (CMVP). Module Validation Program (CMVP). The requirements of this Recommendation are indicated Die Anforderungen dieser Empfehlung werden angezeigt
by the word “shall.” Some of these requirements may be out-of-scope for CAVP or CMVP durch das Wort "soll". Einige dieser Anforderungen können out-of-scope für CAVP oder CMVP
validation testing, and thus are the responsibility of entities using, implementing, installing, or Validierungstests und sind somit in der Verantwortung der Unternehmen mit, Implementierung, Installation, oder
configuring applications that incorporate this Recommendation. Konfiguration von Anwendungen, die diese Empfehlung zu integrieren.
3 Introduction 3 Einführung
This publication specifies three block cipher modes of operation—or, simply, modes—for Diese Veröffentlichung gibt drei Blockchiffre Betriebsarten-oder einfach-Modi für
format-preserving encryption (FPE). Format erhalt Verschlüsselung (FPE).
Previously approved encryption modes transform bit strings—sequences of 0 s and 1 s—into Zuvor genehmigten Verschlüsselungsarten verwandeln Bit-Strings-Sequenzen von 0 und 1 s-in
other bit strings, but these modes are not directly applicable to decimal strings, like Social andere Bit-Strings, aber diese Modi sind nicht direkt auf dezimal Saiten, wie Sozial
Security numbers (SSNs) or credit card numbers (CCNs), or to other data formats. Sicherheitsnummern (Sozialversicherungsnummern) oder Kreditkartennummern (CCN), oder in andere Datenformate.
Given any finite set of symbols, like the decimal numerals, FPE transforms data that is formatted Angesichts jede endliche Menge von Symbolen, wie die Dezimalzahlen, FPE trägt die Daten, formatiert ist
as a sequence of the symbols in such a way that the encrypted form of the data has the same als eine Folge der Symbole in der Weise, dass die verschlüsselte Form der Daten hat den gleichen
format and length as the original data. Format und Länge wie die Originaldaten. Thus, an FPE-encrypted SSN also appears to be an SSN. Somit erscheint ein FPE-SSN verschlüsselt auch eine SSN sein.

Page 8 Seite 8
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
2 2
Consequently, FPE facilitates the targeting of encryption to sensitive information, as well as the Folglich FPE erleichtert die Ausrichtung der Verschlüsselung, um sensible Informationen, sowie
retrofitting of encryption technology to legacy applications, where a conventional encryption Nachrüstung von Verschlüsselungstechnologie, um Legacy-Anwendungen, bei denen eine konventionelle Verschlüsselung
mode might not be feasible because it would disrupt data fields/pathways. Modus möglicherweise nicht machbar sein, weil es Datenfelder stören / Wege. FPE has emerged as a FPE als ein hervor
useful cryptographic tool, whose applications include financial-information security, data nützlich kryptografischen Werkzeug, dessen Anwendungen gehören Finanzinformationssicherheit, Daten
sanitization, and transparent encryption of fields in legacy databases. Desinfektion und transparente Verschlüsselung von Feldern in Legacy-Datenbanken.
The three FPE modes specified in this publication are abbreviated FF1, FF2, and FF3, to indicate Die drei in dieser Veröffentlichung angegebenen FPE-Modi werden abgekürzt FF1, FF2, FF3 und, um anzuzeigen,
that they are format-preserving, Feistel-based encryption modes. dass sie Format erhalt, Feistel-basierte Verschlüsselung Modi. They were submitted to NIST Sie wurden auf NIST eingereicht
under the names FFX[Radix], VAES3, and BPS-BC, in [2] , [1 3], and [3], respectively. unter den Namen FFX [Radix], VAES3 und BPS-BC, in [2] , [1 3], [3] auf. Each Jeder
mode fits within a larger framework, called FFX, for constructing FPE mechanisms, that was Modus passt in einen größeren Rahmen, genannt FFX, für den Bau von FPE Mechanismen, war, dass
submitted to NIST in [ 1]. The “X” indicates the flexibility to instantiate the framework with NIST eingereicht in [ 1]. Das "X" zeigt die Flexibilität, um den Rahmen mit instanziieren
different parameter sets, as well as FFX's evolution from the FFSEM specification earlier verschiedenen Parametersätzen sowie FFX der Evolution von der früheren Spezifikation FFSEM
submitted to NIST in [12]. NIST in [12] vorgelegt.
The FFX framework itself is not specified in this publication; Die FFX Rahmen selbst wird nicht in dieser Veröffentlichung angegebenen; in fact, FF1, FF2, and FF3 are not In der Tat, FF1, FF2, FF3 und nicht
presented explicitly as instantiations of FFX parameter sets, but rather as separate algorithms, in explizit als Instanziierungen FFX Parametersätze dargestellt, sondern als separate Algorithmen in
order to simplify the individual specifications. Um die einzelnen Spezifikationen vereinfachen.
FF1, FF2, and FF3 each employ the Feistel structure of encryption—see Sec. 5. 4—which also FF1, FF2, FF3 und verwenden jeweils die Feistel-Struktur-Verschlüsselung siehe Kap. 5. 4-die auch
underlies the Data Encryption Algorithm [8] . liegt dem Data Encryption Algorithm [8] . At the core of FF1, FF2, and FF3 are somewhat Im Kern des FF1, FF2 sind, und FF3 etwas
different Feistel round functions that are derived from an approved block cipher with 128-bit verschiedenen Feistel Runde Funktionen, die aus einer genehmigten Blockchiffre mit 128-Bit abgeleitet werden
blocks, ie, the AES algorithm Blöcke, dh der AES-Algorithmus
1 1
[6]. [6].
In addition to the formatted data for which the modes provide confidentiality, each mode also Zusätzlich zu den formatierten Daten, für die die Betriebsarten bereitzustellen Vertraulichkeit, jeder Modus auch
takes a “tweak” input, ie, additional information that is not necessarily secret. nimmt eine "zwicken"-Eingang, dh zusätzliche Informationen, die nicht unbedingt geheim. This functionality Diese Funktionalität
can be especially important for FPE modes, because the number of possible values for the kann besonders wichtig für FPE Arten, da die Anzahl der möglichen Werte für die
confidential data is often relatively small. vertraulichen Daten ist oft relativ gering. In particular, the encrypted form of the data can vary Insbesondere die verschlüsselte Form der Daten variieren kann
in different instances when the tweak inputs are different. in verschiedenen Fällen, wenn das Tweak-Eingänge sind unterschiedlich. See Appendix C for further discussion Siehe Anhang C für die weitere Diskussion
of tweaks. von Tweaks.
The three modes offer somewhat similar performance profiles. Die drei Modi bieten etwas ähnlich Leistungsprofile. FF1 supports the greatest range of FF1 unterstützt die größte Auswahl an
lengths for the protected, formatted data and the tweak. Längen für die geschützten, formatierte Daten und die zwicken. FF2 generates a subkey for the block FF2 erzeugt einen Unterschlüssel für den Block
cipher in the Feistel round function, which can help protect the original key from side-channel Chiffre in der Feistel-Runde-Funktion, die zum Schutz der Originalschlüssel von Seitenkanal können
analysis. Analyse. FF3 offers the lowest round count, eight, compared to ten for FF1 and FF2, and is the FF3 bietet den niedrigsten runde Zahl, acht, im Vergleich zu zehn für FF1 und FF2 und die
least flexible in the tweaks that it supports. dest flexibel in den Veränderungen, die es unterstützt.
The BPS mechanism for FPE—named after its designers, Brier, Peyrin, and Stern—was Die BPS Mechanismus für die Zeit nach seinem Designer, Brier, Peyrin und FPE genannten Stern-war
submitted to NIST in [3] ; NIST eingereicht in [3] ; FF3 is essentially equivalent to the BPS-BC component of BPS, FF3 ist im wesentlichen äquivalent zu dem BPS-BC Komponente BPS,
instantiated with a 128-bit block cipher. mit einem 128-Bit-Blockchiffre instanziiert. The full BPS mode—in particular, its chaining Die vollständigen BPS-Modus insbesondere seine Verkettung
mechanism for longer input strings—is not approved in this Recommendation. Mechanismus für mehr Eingabezeichenfolgen-wird in dieser Empfehlung nicht zugelassen.
1 1
The term “algorithm” here indicates a high-level cryptographic technique that may encompass more than one Der Begriff "Algorithmus" bezeichnet hier einen High-Level-Verschlüsselungstechnik, die umfassen kann mehr als eine
computational procedure; Rechenverfahren; for example, an “encryption algorithm” like the AES algorithm has transformations for beispielsweise ein "Verschlüsselungsalgorithmus" wie der AES-Algorithmus hat Transformationen für
both encryption and decryption. sowohl die Verschlüsselung und Entschlüsselung. This publication also contains ten numbered algorithms in the original sense of the Diese Veröffentlichung enthält auch zehn nummerierten Algorithmen im ursprünglichen Sinne des
word, ie, as a list of instructions for executing a single computational procedure. Wort, dh, als eine Liste von Anweisungen zur Ausführung eines einzelnen Rechenverfahren.

Page 9 Seite 9
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
3 3
4 Definitions and Notation 4 Definitionen und Notation
4.1 Definitions 4.1 Definitionen
alphabet Alphabet
A finite set of two or more symbols. Ein endlicher Satz von zwei oder mehreren Symbolen.
approved genehmigt
FIPS-approved or NIST-recommended: an algorithm or technique FIPS-genehmigten oder NIST-empfohlen: einen Algorithmus oder Technik
that is either 1) specified in a FIPS or a NIST Recommendation, or dass entweder 1) in einer FIPS oder NIST Empfehlung angegeben oder
2) adopted in a FIPS or a NIST Recommendation. 2) angenommen in einer FIPS oder NIST Empfehlung.
base Basis
The number of characters in a given alphabet; Die Anzahl von Zeichen in einem gegebenen Alphabet; represented as radix als Radix vertreten
in this publication. in dieser Publikation.
bit Bit
A binary digit: 0 or 1. Eine binäre Ziffer 0 oder 1 ist.
bit string Bit-String
A finite, ordered sequence of bits. Eine endliche, geordnete Folge von Bits.
block Block
For a given block cipher, a bit string whose length is the block size Für einen gegebenen Block-Chiffre, eine Bitfolge, deren Länge die Blockgröße
of the block cipher. der Blockchiffre.
block cipher Blockchiffre
A parameterized family of permutations on bit strings of a fixed Eine parametrisierte Familie von Permutationen auf Bit-Strings aus einer festen
length; Länge; the parameter that determines the permutation is a bit string Der Parameter, der die Permutation bestimmt eine Bitfolge
called the key. rief der Schlüssel.
block cipher Blockchiffre
mode of operation Arbeitsweise
An algorithm for the cryptographic transformation of data that is Ein Algorithmus für die kryptographische Umwandlung von Daten, ist
based on a block cipher. basierend auf einer Blockchiffre.
block size Blockgröße
For a given block cipher and key, the fixed length of the input (or Für einen gegebenen Block Cipher und Schlüssel, der festen Länge des Eingangs (oder
output) bit strings. Ausgang) Bit-Strings.
block string Block-String
A bit string that can be represented as the concatenation of a finite, Eine Bitfolge, die als Verkettung eines endlichen dargestellt werden kann,
ordered sequence of blocks. geordneten Sequenz von Blöcken.
byte Byte
A string of eight bits. Eine Reihe von acht Bits.
byte string Byte-String
A bit string that can be represented as the concatenation of a finite, Eine Bitfolge, die als Verkettung eines endlichen dargestellt werden kann,
ordered sequence of bytes. geordneten Sequenz von Bytes.
character Charakter
A symbol in an alphabet. Ein Symbol in einem Alphabet.
character string Zeichenkette
A finite, ordered sequence of characters. Eine endliche, geordnete Folge von Zeichen.
ciphertext Chiffretext
The numeral string that is the encrypted form of a plaintext. Die Ziffer Zeichenfolge, die die verschlüsselte Form einer Klartext.

Page 10 Seite 10
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
4 4
decryption Entschlüsselung
function Funktion
For a given block cipher and key, the function of an FPE mode that Für eine gegebene Blockchiffre und Schlüssel, die Funktion eines FPE-Modus,
takes a ciphertext numeral string and a tweak as input and returns nimmt eine Schlüsseltext numerischen Kette und ein zwicken als Eingabe und gibt
the corresponding plaintext numeral string as output. der entsprechende Klartext Ziffer String als Ausgabe.
designated cipher Chiffre bezeichnet
function Funktion
For a given block cipher and key, the choice of either the forward Für eine gegebene Blockchiffre und Schlüssel, die Wahl, entweder die Vorwärts
transformation or the inverse transformation. Transformation oder der inversen Transformation.
encryption Verschlüsselung
function Funktion
For a given block cipher and key, the function of an FPE mode that Für eine gegebene Blockchiffre und Schlüssel, die Funktion eines FPE-Modus,
takes a plaintext numeral string and a tweak as input and returns a nimmt eine Klartext-String und Zahl ein zwicken als Eingabe und gibt eine
ciphertext numeral string as output. Geheimtextzeichen String als Ausgabe.
exclusive-OR Exklusiv-Oder-
The bitwise addition, modulo 2, of two bit strings of equal length. Das bitweise hinaus Modulo 2, von zwei Bit-Strings gleich lang.
Feistel structure Feistel-Struktur
A framework for constructing an encryption mode. Ein Rahmen für den Aufbau eines Verschlüsselungsmodus. The framework Der Rahmen
consists of several iterations, called rounds, in which a keyed aus mehreren Iterationen genannt Runden, wobei eine Keil
function, called the round function, is applied to one part of the data Funktion, die sogenannte Rund Funktion wird zu einem Teil der Daten angewendet
in order to modify the other part of the data; um den anderen Teil der Daten zu ändern; the roles of the two Die Rollen der beiden
parts are swapped for the next round. Teile für die nächste Runde vertauscht.
forward vorwärts
transformation Transformation
For a given block cipher, the permutation of blocks that is Für einen gegebenen Block-Chiffre, daß die Permutation von Blöcken
determined by the choice of a key. durch die Wahl des Schlüssels bestimmt.
inverse Gegenteil
transformation Transformation
For a given block cipher, the inverse of the permutation of blocks Für einen gegebenen Block-Chiffre, die Umkehrung der Permutation von Blöcken
that is determined by the choice of a key. dass durch die Wahl des Schlüssels bestimmt.
key Schlüssel
For a given block cipher, the secret bit string that parameterizes the Für eine gegebene Blockchiffre, die geheime Bit String, der parametrisiert
permutations. Permutationen.
mode Modus
See “block cipher mode of operation.” Siehe "Blockchiffre Betriebsmodus."
numeral Zahl
For a given base, a nonnegative integer less than the base. Für eine gegebene Basis, eine nicht negative ganze Zahl kleiner als die Basis.
numeral string numerischen Kette
For a given base, a character string that is comprised of numerals for Für eine gegebene Basis, eine Zeichenkette, die für die von Ziffern besteht
the base. die Basis.
plaintext Klartext
A numeral string whose confidentiality is protected by an FPE Eine Zahl Zeichenkette, deren Vertraulichkeit durch ein FPE geschützt
mode. Modus.
prerequisite Voraussetzung
A required input to an algorithm that has been established prior to Eine erforderliche Eingabe in einen Algorithmus, der vor dem festgestellt wurde
the invocation of the algorithm. der Aufruf des Algorithmus.
shall wird
Is required to. Ist erforderlich, um. Requirements apply to conforming implementations. Anforderungen gelten für konforme Implementierungen.
should sollte
Is recommended to. Wird empfohlen,.
tweak zwicken
The input parameter to the encryption and decryption functions Der Eingangsparameter für die Verschlüsselung und Entschlüsselung Funktionen
whose confidentiality is not protected by the mode. deren Vertraulichkeit nicht durch den Modus geschützt.

Page 11 Seite 11
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
5 5
4.2 Acronyms 4.2 Akronyme
AES AES
Advanced Encryption Standard. Advanced Encryption Standard.
CAVP CAVP
Cryptographic Algorithm Validation Program. Cryptographic Algorithm Validation Program.
CCN CCN
credit card number. Kreditkartennummer.
CMVP CMVP
Cryptographic Module Validation Program. Cryptographic Module Validation Program.
FIPS FIPS
Federal Information Processing Standard. Federal Information Processing Standard.
FISMA FISMA
Federal Information Security Management Act. Federal Information Security Management Act.
FPE FPE
format-preserving encryption. Format erhalt Verschlüsselung.
IETF IETF
Internet Engineering Task Force. Internet Engineering Task Force.
ITL ITL
Information Technology Laboratory. Laboratorium für Informationstechnologie.
NIST NIST
National Institute of Standards and Technology. National Institute of Standards and Technology.
PRF PRF
pseudorandom function. Pseudozufallsfunktion.
RFC RFC
Request For Comment. Anfrage für eine Stellungnahme.
SSN SSN
Social Security number. Sozialversicherungsnummer.
4.3 Operations and Functions 4.3 Vorgänge und Funktionen
BYTELEN BYTELEN
(T) (T)
The number of bytes in a byte string, T . Die Anzahl der Bytes in einer Byte-Folge, T.
CIPH CIPH
K K
( X ) (X)
The output of the designated cipher function of the block cipher Der Ausgang des bestimmten Verschlüsselungsfunktion der Blockchiffre
under the key K applied to the block X . unter dem Schlüssel K angelegt, um den Block X.
LEN LEN
( X ) (X)
The length of the character string X . Die Länge der Zeichenkette x.
LOG LOG
b b
( x ) (X)
The base b logarithm of the real number x ≠ 0. Die Basis b Logarithmus der reellen Zahl x ≠ 0.
NUM NUM
radix Radix
( X ) (X)
The number that the numeral string X represents in base radix , with Die Zahl, die die Ziffer String X in der Basis radix, mit
the most significant character first. der wichtigste Charakter zuerst.
PRF PRF
( X ) (X)
The output of the function Der Ausgang des Funktions
PRF PRF
applied to the block X with the dem Block X mit der angelegten

Page 12 Seite 12
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
6 6
designated cipher function of the block cipher under the key K . bezeichnet Verschlüsselungsfunktion der Blockchiffre unter dem Schlüssel K.
REV REV
( X ) (X)
Given a bit string, X , the string that consists of the bits of X in Bei einer Bit-Kette, X, die Zeichenkette, die aus den Bits in X besteht
reverse order. umgekehrter Reihenfolge.
STR STR
m m
radix Radix
( x ) (X)
Given a nonnegative integer x less than radix Angesichts einer nicht negativen ganzen Zahl x kleiner als Radix
m m
, the representation of Die Darstellung von
x as a string of m characters in base radix , with the most significant x als eine Folge von m Zeichen in Basis radix, mit dem höchstwertigen
character first. Charakter zuerst.
x x
The greatest integer that does not exceed the real number x . Die größte ganze Zahl, die die reelle Zahl x nicht überschreitet.
x x
The least integer that is not less than the real number x . Die kleinste ganze Zahl, die nicht kleiner als der reale Zahl x ist.
[ x ] [X]
s s
Given a nonnegative integer x less than 256 Angesichts einer nicht negativen ganzen Zahl x weniger als 256
s s
, the representation of x Die Darstellung von x
as a string of s bytes. als eine Folge von n Bytes.
[ i .. j ] [I .. j]
The set of integers between two integers i and j , including i and j . Die Menge der ganzen Zahlen zwischen zwei ganzen Zahlen i und j wie i und j.
x mod m x mod m
The nonnegative remainder of the real number x modulo the positive Die nichtnegativen Rest der reellen Zahl x modulo der positiven
integer m. ganze Zahl m.
X [ i ] X [i]
The i th character of the string X . Das i-te Zeichen der Zeichenkette X.
X [ i .. j ] X [i .. j]
The substring of characters of a string X from X [ i ] to X [ j ], including Die Kette von Zeichen eines Wortes x aus X [i] X [j], einschließlich
X [ i ] and X [ j ]. X [i] und X [j].
XY XY
The bitwise exclusive-OR of bit strings X and Y whose bit lengths Das bitweise Exklusiv-ODER-Bit-Strings X und Y, deren Bit Längen
are equal. sind gleich.
X || Y X Y ||
The concatenation of bit strings X and Y . Die Verkettung von Bitfolgen x und y.
0 0
s s
The bit string that consists of s consecutive '0' bits. Die Bit-String, der aus n aufeinanderfolgenden "0"-Bits besteht.
4.4 Examples of Basic Operations and Functions 4.4 Beispiele von Grundlegende Bedienung und Funktionen
In this publication, the Courier New font indicates the two binary bits, 0 and 1 . In dieser Veröffentlichung gibt die Schriftart Courier New, die zwei binäre Bits 0 und 1.
Given positive real numbers b and x , the base b logarithm of x , denoted Gegebenen positiven reellen Zahlen b und x, die Basis b Logarithmus von x, bezeichnet
LOG LOG
b b
( x ), is the unique (X) ist die einzigartige
real number for which b reelle Zahl, für die b
LOG LOG
b b
( x ) (X)
= x . = X. For example, Beispielsweise,
LOG LOG
2 2
(64) = 6, (64) = 6,
LOG LOG
2 2
(10) ≈ 3.32, and (10) ≈ 3,32 und
LOG LOG
13 13
(169) = (169) =
2. 2.
Given a real number x , the floor function, denoted ⌊ x ⌋, is the greatest integer that does not exceed Bei einer reellen Zahl x, die Bodenfunktion, bezeichnet ⌊ x ⌋ ist die größte ganze Zahl, die nicht übersteigt
x . x. For example, ⌊2.1⌋= 2, and ⌊4⌋= 4. Zum Beispiel ⌊2.1⌋ = 2 und ⌊4⌋ = 4 ist.
Given a real number x , the ceiling function, denoted  x , is the least integer that is not less than x . Bei einer reellen Zahl x, die Decke Funktion, bezeichnet   x ist die kleinste ganze Zahl, die nicht kleiner als x ist.
For example, 2.1 = 3, and 4 = 4. Zum Beispiel 2.1 = 3 und 4 = 4 ist.

Page 13 Seite 13
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
7 7
Given two integers i and j with ij , the set of integers between i and j , including i and j , is Wenn zwei ganzen Zahlen i und j mit ij, die Menge der ganzen Zahlen zwischen i und j, mit i und j,
denoted [ i .. j ]. bezeichnet [i .. j]. For example, [2 .. 5] = {2, 3, 4, 5}. B. [2 .. 5] = {2, 3, 4, 5}.
Given a real number x , and a positive integer m , the remainder of x modulo m , denoted x mod m , Bei einer reellen Zahl x, und eine positive ganze Zahl m, wobei der Rest von x modulo m, mit x mod m,
is xmx / m ⌋. ist x - ⌊ x m / m ⌋. For example, 20 mod 7 = 6, and -3 mod 7 = 4. Zum Beispiel 20 mod 7 = 6, und -3 mod 7 = 4 ist.
Given a positive integer s , 0 Bei einer positiven ganzen Zahl n, 0
s s
denotes the string that consists of s ' 0 ' bits. bezeichnet die Zeichenfolge, die von s '0' Bits besteht. For example, 0 Beispielsweise 0
8 8
= =
00000000 . 00000000.
The concatenation operation on character strings is denoted ||. Die Verkettung Betrieb auf Zeichenketten bezeichnet ist ||. For example, 001 || 10111 = Beispielsweise 001 = 10111 ||
00110111 , and if the base is 16, for example, 1 3 13 7 || 0 8 10 = 1 3 13 7 0 8 10. 00110111, und wenn die Basis 16, beispielsweise 1 3 13 7 || 0 8 10 = 1 3 13 7 0 8 10.
Given bit strings of equal length, the exclusive-OR (XOR) operation, denoted ⊕, specifies the Gegeben Bitfolgen von gleicher Länge, die Exklusiv-ODER (XOR) Operation bezeichnet ⊕ spezifiziert der
addition, modulo 2, of the bits in corresponding bit positions. Zusätzlich modulo 2 der Bits in entsprechenden Bitpositionen. For example, 1001110101 = B. 10011 10101 ⊕ =
00110 . 00110.
Given a character string X , the length of X is denoted Bei einer Zeichenkette x ist die Länge von X bezeichnet
LEN LEN
( X ). (X). For example, Beispielsweise,
LEN LEN
( %$$ ) = 3, and (% $$) = ​​3, und
LEN LEN
( 00010 ) = 5. (00010) = 5.
Given a byte string X , the length of X in bytes is denoted Bei einer Bytefolge X, die Länge X in Bytes bezeichnet
BYTELEN BYTELEN
( X ). (X). For example, Beispielsweise,
BYTELEN BYTELEN
( 1011100110101100 ) = 2. (1011100110101100) = 2.
Given a character string X , and any index i , ie, with 1 ≤ i ≤ Angesichts einer Zeichenkette X, und jede Index i, dh mit 1 ≤ i
LEN LEN
( X ), the i th character of X is (X), das i-te Zeichen von X
denoted X [ i ]. mit x [i]. For a pair of indices ( i , j ), with 1≤ ij Für ein Paar von Indizes (i, j), mit 1≤ ij
LEN LEN
( X ), the substring of characters from (X), die Teil von Zeichen aus
X [ i ] to X [ j ] is denoted X [ i .. j ]. X [i] X [j] bezeichnet X [i .. j]. For example, if X = &$*#@@% , then X[2]= $ , X[3..5]= *#@ . Zum Beispiel, wenn X = & $ * #@@%, X [2] = $, X [3..5] = * @ #.
Given a base, radix , and a length, m , there are radix Angesichts einer Basis, Radix, und eine Länge, m, es gibt radix
m m
distinct numeral strings. unterschiedliche Zahl Saiten. Given an integer x Angesichts eine ganze Zahl x
such that 0 ≤ x < radix so dass 0 ≤ x <radix
m m
, the integer-to-string function, denoted , Die ganze Zahl-zu-String-Funktion, bezeichnet
STR STR
m m
radix Radix
( x ), is the representation (X) ist die Darstellung
of x as a numeral string of length m in base radix , with the most significant character first, ie, on x eine numerische Kette der Länge m in Basis radix, wobei das höchstwertige Zeichen zuerst, dh, auf
the left. links. For example, Beispielsweise,
STR STR
4 4
12 12
(559) is the string of four numerals in base 12 that represents 559, (559) ist die Folge von vier Zahlen in der Basis 12, die 559 steht für,
namely, 0 3 10 7. An algorithm for computing nämlich 0 3 10 7. Ein Algorithmus für die Berechnung
STR STR
m m
radix Radix
( x ) is given in Sec. 5.5. (X) ist in § gegeben. 5.5.
A separate notation is given for the conversion of integers to byte strings: [ x ] Eine separate Notation wird für die Umwandlung von ganzen Zahlen Bytefolgen gegeben: [x]
s s
= =
STR STR
8 s 8 s
2 2
( x ). (X). For Für
example, [1] Beispiel [1]
1 1
= 00000001 . = 00000001.
Given a (non-empty) numeral string X in base radix of length m , the string-to-integer function, Bei einer (nicht leeren) Ziffer String X in der Basis radix der Länge m, der String-to-Integer-Funktion,
denoted bezeichnet
NUM NUM
radix Radix
( X ), is the integer x such that (X), die ganze Zahl x derart, dass
STR STR
m m
radix Radix
( x ) = X . (X) = x. In other words, Mit anderen Worten,
NUM NUM
radix Radix
( X ) is the (X) ist die
non-negative integer less than radix nicht negative ganze Zahl kleiner als radix
LEN LEN
( X ) (X)
whose most-significant-character-first representation in deren höchstwertige-Charakter-Darstellung in ersten
base radix is X . Basis radix ist X. For example, Beispielsweise,
NUM NUM
2 2
( 00011010 ) = 26. An algorithm for computing (00011010) = 26. Ein Algorithmus zur Berechnung
NUM NUM
radix Radix
( X ) (X)
is given in Sec. 5.5. ist in Sec. gegeben 5.5.
Given a bit string, X , the string Bei einem Bit-String, X, der String
REV REV
( X ) is the concatenation of the bits of X in reverse order. (X) ist die Verkettung der Bits X in umgekehrter Reihenfolge. For Für
example, Beispiel
REV REV
( 00001 ) = 10000. (00001) = 10000.

Page 14 Seite 14
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
8 8
5 Preliminaries 5 Vorbemerkungen
5.1 Character Strings 5.1 Zeichenketten
A finite set of two or more symbols is called an alphabet, and the elements of an alphabet are Ein endlicher Satz von zwei oder mehr Symbolen wird als ein Alphabet und die Elemente eines Alphabets
called characters. genannt Zeichen. A character string is a finite sequence of characters from an alphabet. Eine Zeichenkette ist eine endliche Folge von Zeichen aus einem Alphabet.
Individual characters may repeat in the string. Einzelne Zeichen können in der Zeichenfolge zu wiederholen. Thus, for example, given the alphabet of lower- So kann zum Beispiel gegeben, das Alphabet der UNTEREN
case English letters, Bei englischen Buchstaben,
{a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}, {A, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y , z},
the words “ hello ” and “ cannot ” are character strings, but “ Hello ” and “ can't ” are not, die Worte "Hallo" und "nicht" sind Zeichenketten, sondern "Hallo" und "kann nicht" nicht,
because the symbols “ H ” and “ ' ” are not in the alphabet. weil die Symbole "H" und "'" sind nicht im Alphabet.
The number of characters in an alphabet is called the base, denoted radix , so that radix ≥ 2 by Die Anzahl der Zeichen in einem Alphabet wird als Basis bezeichnet radix, so dass radix ≥ 2
definition. Definition. For a given base, a numeral is a nonnegative integer that is less than the base. Für eine gegebene Base eine Zahl eine nichtnegative ganze Zahl ist, die kleiner als die Basis ist.
The base is a parameter of FF1, FF2, and FF3, and their specifications assume that the alphabet Die Basis ist ein Parameter des FF1, FF2 und FF3, und deren Spezifikation angenommen, daß das Alphabet
is the set of numerals for the base: ist die Menge der Zahlen für die Basis:
{0, 1, …, radix -1}. {0, 1, ..., -1} radix.
Therefore, to apply FF1, FF2, or FF3 to character strings from an arbitrary alphabet, the string Deshalb, um FF1, FF2, FF3 oder Zeichenketten von einem beliebigen Alphabet gelten, die Zeichenfolge
must first be converted, via a one-to-one correspondence, into a string of numerals for the base of müssen zuerst konvertiert werden, über eine Eins-zu-Eins-Entsprechung, in eine Ziffernfolge für die Basis
the alphabet. Das Alphabet. For example, the natural conversion from lower-case English letters to base 26 Beispielsweise die natürlichen Umwandlung von Klein englische Buchstaben auf Basis 26
numerals is Ziffern ist
a→0, b→1, c→2, … x→23, y→24, z→25, a → 0, b → 1, c → 2, ... x → 23, y → 24, z → 25,
although other one-to-one correspondences are possible. obwohl andere Eins-zu-Eins-Entsprechungen möglich. The choice and implementation of Die Auswahl und Anwendung der
conversion methods from particular alphabets to their appropriate alphabets of numerals is Konvertierungsmethoden von bestimmten Buchstaben in die entsprechenden Buchstaben von Ziffern ist
outside the scope of this publication. außerhalb des Umfangs dieser Veröffentlichung.
The interpretation of a numeral string as a number depends on the base and the ordering Die Interpretation einer numerischen Kette als Zahl hängt von der Basis und dem Bestell
convention; Konvention; algorithms for functions that convert numeral strings to numbers and vice versa are Algorithmen für Funktionen, die Zahl Zeichenketten in Zahlen umwandeln und umgekehrt sind
given in Sec. in § gegeben. 5.5. 5.5. Individual numerals, and other numbers in the specifications, are represented Einzelnen Ziffern und andere Zahlen in den Spezifikationen, sind vertreten
in base 10. in der Basis 10.
The basic operations and functions on strings are defined with examples in Sec. Die grundlegenden Operationen und Funktionen auf Zeichenketten werden mit Beispielen im Sinne des §. 4.4. 4.4.
5.2 Underlying Block Cipher and Key 5.2 Basiswert Block Cipher und Key
The encryption and decryption functions of FF1, FF2, and FF3 feature a block cipher as the main Die Verschlüsselung und Entschlüsselung Funktionen FF1, FF2 und FF3 über eine Blockchiffre als Haupt
component; Komponente; thus, each of these FPE mechanisms is a mode of operation (mode, for short) of the Somit wird jeder dieser Mechanismen FPE eine Betriebsart (Modus abgekürzt) der
block cipher. Blockchiffre.

Page 15 Seite 15
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
9 9
For any given key, K , the underlying block cipher of the mode is a permutation, ie, an invertible Für jeden gegebenen Schlüssel K, der zugrundeliegende Blockchiffre der Betriebsart ist eine Permutation, dh eine invertierbare
transformation on bit strings of a fixed length; Transformation von Bitfolgen mit einer festen Länge; the fixed-length bit strings are called blocks, and fester Länge Bit-Strings werden Blöcke genannt, und
the length of a block is called the block size. Die Länge eines Blocks wird als Blockgröße. For an FPE mode, as part of the choice of the Für ein FPE-Modus als Teil der Wahl des
underlying block cipher with the key, either the forward transformation or the inverse zugrunde liegenden Blockchiffre mit dem Schlüssel, entweder in der Vorwärtstransformation oder der inversen
transformation Transformation
2 2
is specified as the designated cipher function, denoted als Chiffre bezeichnet Funktion angegeben, bezeichnet
CIPH CIPH
K K
. . The inverse of Das Inverse
CIPH CIPH
K K
is not needed for the modes that are specified in this publication. wird für die Modi, die in dieser Veröffentlichung angegeben sind, erforderlich ist.
For each of the three modes, the underlying block cipher shall be approved, and the block size Für jede der drei Betriebsarten wird die zugrundeliegende Blockchiffre zugelassen werden, und die Blockgröße
shall be 128 bits. werden 128 Bits. Currently, the AES block cipher, with key lengths of 128, 192, or 256 bits, is Derzeit ist die AES-Blockverschlüsselung, mit Schlüssellängen von 128, 192 oder 256 Bit ist
the only block cipher that fits this profile. die einzige Blockchiffre, die dieses Profil passt.
The choice of the key length affects the security of the FPE modes, eg, against brute-force Die Wahl der Schlüssellänge wirkt sich auf die Sicherheit der FPE-Modi, zB gegen Brute-Force-
search, and also affects the details of the implementation of the AES algorithm. suchen, und wirkt auch auf die Details der Implementierung des AES-Algorithmus. Otherwise, the Andernfalls wird die
key length does not affect the implementation of FF1, FF2, and FF3, and the choice of the key Schlüssellänge beeinflußt nicht die Durchführung FF1, FF2 und FF3, und die Wahl des Schlüssels
length is not explicitly indicated in their specifications Methods for generating cryptographic Länge nicht explizit in ihren Spezifikationen Verfahren zur Erzeugung von kryptographischen deutet
keys are discussed in [9]; the goal is to select the keys uniformly at random, ie, for each Schlüssel werden diskutiert in [9], das Ziel ist, die Schlüssel zufällig und gleichverteilt, also wählen, für jeden
possible key to occur with equal probability. möglichen Schlüssel mit gleicher Wahrscheinlichkeit auftreten.
The key shall be kept secret, ie, disclosed only to parties that are authorized to know the Der Schlüssel muss geheim gehalten werden, dh, offenbart nur Parteien, die berechtigt sind, die wissen,
protected information. geschützte Informationen. Compliance with this requirement is the responsibility of the entities Die Einhaltung dieser Vorschrift ist in der Verantwortung der Unternehmen
using, implementing, installing, or configuring applications that incorporate this Verwendung, Implementierung, Installation, Konfiguration oder Anwendungen, die dies übernehmen
Recommendation. Empfehlung. The management of cryptographic keys is outside the scope of this Die Verwaltung der kryptographische Schlüssel ist außerhalb des Umfangs dieser
publication. Veröffentlichung.
5.3 Encryption and Decryption Functions 5.3 Verschlüsselung und Entschlüsselungsfunktionen
For a given key, denoted K , for the designated block cipher, FF1, FF2, and FF3 each consist of Für einen bestimmten Schlüssel, bezeichnet mit K, für die bezeichneten Block-Chiffre, FF1, FF2, FF3 und jeweils bestehen aus
two related functions: encryption and decryption. zwei verwandte Funktionen: Verschlüsselung und Entschlüsselung. The encryption function takes as input a Die Verschlüsselungsfunktion als Eingabe ein
numeral string called the plaintext, denoted X , and an additional parameter, called the tweak, numerischen Kette namens Klartext, bezeichnet X, und einen zusätzlichen Parameter, die so genannte zwicken,
denoted T ; t bezeichnet; the function returns a numeral string called the ciphertext, denoted Y , with the same Die Funktion gibt einen numerischen Kette genannt verschlüsselten Text Y bezeichnet, mit dem gleichen
length as X . Länge X. Similarly, the inputs to the decryption function are a numeral string X and a tweak T ; In ähnlicher Weise sind die Eingänge an die Entschlüsselungsfunktion sind eine numerische Kette und X ein zwicken T;
the output is a numeral string Y of the same length as X . der Ausgang eine numerische Kette Y mit der gleichen Länge wie X.
For FF1, the encryption function and the decryption function are denoted FF1.Encrypt( K , T , X ) Für FF1, die Verschlüsselungsfunktion und der Entschlüsselungsfunktion bezeichnet werden FF1.Encrypt (K, T, X)
and FF1.Decrypt( K , T , X ), with analogous notation for FF2 and FF3. und FF1.Decrypt (K, T, X), mit analogen Notation für FF2 und FF3.
For a given tweak, the decryption function is the inverse of the encryption function, so that Für eine gegebene optimieren, ist die Entschlüsselungsfunktion die Umkehrung der Verschlüsselungsfunktion, sodass
FF1.Decrypt( K , T , FF1.Encrypt( K , T , X )) = X . FF1.Decrypt (K, T, FF1.Encrypt (K, T, X)) = x.
Thus, when a ciphertext is the input to the decryption function, along with the same tweak that Somit wird, wenn ein Chiffretext ist der Eingang an die Entschlüsselungsfunktion, zusammen mit der gleichen zwicken,
was used to generate the ciphertext, the output is the corresponding plaintext. wurde verwendet, um den Chiffretext zu erzeugen, ist das Ausgangssignal der entsprechende Klartext.
2 2
The forward transformation and the inverse transformations are sometimes referred to as the “enrypt” and Die Vorwärtstransformation und die inverse Transformationen werden manchmal als die "enrypt" und bezeichnet
“decrypt” functions, respectively, of the block cipher; "Entschlüsseln" Funktionen bzw. der Blockchiffre; however, in this publication, those terms are reserved for jedoch in dieser Veröffentlichung, diese Begriffe sind reserviert
functions of the FPE modes. Funktionen der FPE-Modi.

Page 16 Seite 16
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
10 10
The tweak may be any information that can be associated to the input numeral string and does Der Tweak kann alle Informationen, die auf den Eingang numerischen Kette verbunden werden kann und tut sein
not need to be kept secret. nicht geheim gehalten werden. Although implementations may fix the value of the tweak, the use of Obwohl Implementierungen können den Wert der Tweak, die Verwendung von fix
variable tweaks is strongly recommended as a security enhancement; Variable zwickt stark als Sicherheitsverbesserung empfohlen; see Appendix C. In FF1 siehe Anhang C. In FF1
and FF3, tweaks are bit strings; und FF3, Tweaks sind Bit-Strings; in FF2, tweaks may also be character strings in a different base. in FF2 kann zwickt auch Zeichenketten in einer anderen Basis sein.
The tweak lengths that can be supported differ for each of the three modes; Der Tweak Längen, die unterstützt werden können, unterscheiden sich für jeden der drei Modi; see the individual finden Sie in der individuellen
specifications in Sec. 6. Spezifikationen in Sec. 6.
The key, K , is indicated in the notation as an input for the encryption and decryption functions; Der Schlüssel K wird in der Notation als Eingang für die Verschlüsselung und Entschlüsselung Funktionen angegeben;
however, in the specifications in this publication, the key is listed as a prerequisite, ie, an input jedoch in den technischen Daten in dieser Veröffentlichung, die Taste als Voraussetzung aufgeführt, dh, eine Eingabe
that is usually established prior to the invocation of the function. dass in der Regel vor dem Aufruf der Funktion etabliert.
3 3
Several other prerequisites are Mehrere andere Voraussetzungen sind
omitted from the above notation, such as the underlying block cipher, the designation of CIPH Aus der obigen Notation weggelassen, wie die zugrundeliegenden Blockchiffre, die Ausweisung des CIPH
K K
, ,
and the base for the numeral strings. und die Basis für den Zahlen Saiten.
5.4 Feistel Structure 5.4 Feistel-Struktur
FFX schemes, including FF1, FF2, and FF3, are based on the Feistel structure for encryption. FFX Formen einschließlich FF1, FF2 und FF3, auf der Feistel-Struktur für die Verschlüsselung basiert.
The Feistel structure consists of several iterations, called rounds, of a reversible transformation, Die Feistel-Struktur besteht aus mehreren Iterationen, genannt Runden, eine reversible Umwandlung,
which consists of three elements: 1) the data is split into two parts; das aus drei Elementen besteht: 1) werden die Daten in zwei Teile geteilt; 2) a keyed function, F 2) eine Schlüsselfunktion F
K K
, ,
called the round function, is applied to one part of the data in order to modify the other part of genannte Rundenfunktion, ist mit einem Teil der Daten, um den anderen Teil zu modifizieren angewendet
the data; Daten; and 3) the roles of the two parts are swapped for the next round. und 3) die Rollen der beiden Teile für die nächste Runde vertauscht. The structure is Die Struktur ist
illustrated in Figure 1 below. in Abbildung 1 veranschaulicht. Four rounds are shown in this example, but ten rounds are actually Vier Runden in diesem Beispiel gezeigt, aber tatsächlich zehn Runden
specified for FF1 and FF2, and eight rounds for FF3. für FF1 und FF2 und FF3 für acht Runden festgelegt.
The two parts of the input numeral string, denoted A Die beiden Teile des Eingangszeichen-String, bezeichnet A
0 0
and B und B
0 0
, consist of u and v characters, , Aus u und v Zeichen,
respectively; sind; the total number of characters, u + v , is denoted n . die Gesamtzahl der Zeichen, u + v, n bezeichnet. The rounds are indexed from 0 to Die Runden von 0 indexiert
3 in the figure. 3 in der Abbildung. During round i , the round function F Während rund i, die Rundenfunktion F
K K
is applied to B an B
i ich
, with the tweak T , the round , Mit dem Tweak T, die Runde
number i , and the length n , as additional inputs, and the result is used to modify A Zahl i und der Länge n, als zusätzliche Eingänge, und das Ergebnis wird für die Modifizierung A
i ich
, via modular Über modulare
addition Zusatz
4 4
, indicated by +, on the numbers that the strings represent Von + angegeben ist, auf die Zahlen, dass die Saiten darstellen
5 5
. . The string that represents Die Zeichenfolge, stellt
the resulting number is named with a temporary variable, C die resultierende Zahl mit einer temporären Variablen, C benannt
i ich
. . The roles of the parts are swapped Die Funktionen der Teile vertauscht
for the next round, so that the modified A für die nächste Runde, so dass die modifizierte A
i ich
, ie, C , Dh, C
i ich
, becomes B Wird B
i +1 i +1
, and B Und B
i ich
becomes A wird zu einem
i +1 i +1
. .
The rectangles containing the two parts of the data in each round are different sizes to illustrate Die Rechtecke, die die beiden Teile der Daten in jeder Runde gibt verschiedene Größen zu illustrieren
that, if n is odd, then u cannot equal v . dass, wenn n ungerade ist, dann kann u nicht gleich v. In order to accommodate such cases, the round function is Um solche Fälle unterzubringen, ist die Rundungsfunktion
constructed so that the lengths of its input and output strings depend on whether the round so konstruiert, daß die Längen der Eingabe und Ausgabezeichen davon abhängen, ob der Rund
number index, i , is even or odd. Nummernindex, i, gerade oder ungerade ist.
The Feistel structure for decryption is almost identical; Die Feistel-Struktur für die Entschlüsselung ist fast identisch; the only changes are 1) modular addition Die einzigen Änderungen sind: 1) modular hinaus
is replaced by modular subtraction, and 2) the order of the round indices is reversed. wird durch modulare Subtraktion ersetzt, und 2) die Reihenfolge der Indizes Runde umgekehrt. For Für
example, in Figure 1, the arguments to F Beispielsweise in Figur 1, die Argumente für F
K K
would begin at n , T , 3 at the top, and end at n , T , 0 at würde bei n an der Spitze an beginnen, T, 3, und am Ende bei n, T, 0
the bottom. der Boden.
3 3
The distinction doesn't affect the execution of the function: all inputs are required, independent of when they were Unabhängig davon, wann sie waren alle Eingaben erforderlich, die Unterscheidung wirkt sich nicht auf die Ausführung der Funktion
established or provided to the implementation. Sitz hat, oder die Umsetzung zur Verfügung gestellt.
4 4
In principle, the addition operation can be any other reversible operation on strings that preserves their length; Im Prinzip kann die Additionsoperation eine andere reversible Operation an Strings, die ihre Länge beibehalten werden; for für
example, the FFX specification [1] supports an option for characterwise addition. beispielsweise der FFX-Spezifikation [1] unterstützt eine Option für zeichen hinaus.
5 5
The ordering convention for the interpretation of strings is different for FF3 than for FF1 and FF2. Der Bestell Konvention für die Interpretation von Zeichenketten ist für FF3 als für FF1 und FF2.

Page 17 Seite 17
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
11 11
Figure 1: Illustration of the Feistel Structure Abbildung 1: Illustration des Feistel-Struktur
5.5 Component Functions 5.5 Komponente Funktionen
This section gives algorithms for the component functions that are called in the specifications of Dieser Abschnitt enthält Algorithmen für die Komponentenfunktionen, die in den Spezifikationen der genannt werden
FF1, FF2, and FF3. FF1, FF2 und FF3. The conversion functions Die Konvertierungsfunktionen
NUM NUM
radix Radix
( X ) and (X) und
STR STR
m m
radix Radix
( x )—defined in Sec. (X) wahrsten Sinne das in Sec. 4.4 4.4
with examples—are specified in Algorithms 1 and 2. These functions support the ordering Beispiele sind in-Algorithmen 1 und 2 festgelegten Diese Funktionen unterstützen den Bestell
convention for the numeral strings in FF1 and FF2, namely, that the first (ie, left-most) numeral Konvention für den Zahlenfolgen in FF1 und FF2, nämlich, dass die erste (dh am weitesten links) Ziffer
of the string is the most-significant numeral. des Strings ist die höchstwertige Ziffer.
A Ein
0 0
B B
0 0
B B
1 1
C C
0 0
A Ein
1 1
B B
0 0
A Ein
2 2
B B
1 1
B B
2 2
C C
1 1
B B
3 3
C C
2 2
A Ein
3 3
B B
2 2
A Ein
4 4
B B
3 3
B B
4 4
C C
3 3
n , T , 0 n, T, 0
u characters u Zeichen
v characters v Zeichen
F F
K K
n , T , 1 n, T, 1
n , T , 2 n, T, 2
n , T , 3 n, T, 3
F F
K K
F F
K K
F F
K K
+ +
+ +
+ +
+ +

Page 18 Seite 18
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
12 12
The function Die Funktion
REV REV
( X ) )—defined in Sec. (X)) wahrsten Sinne das in Sec. 4.4 with an example—is specified in Algorithm 3. It is 4.4 mit einem Beispiel-wird in Algorithmus 3 angegeben ist
used to adapt gebrauchte anpassen
NUM NUM
radix Radix
( X ) and (X) und
STR STR
m m
radix Radix
( x ) to the opposite ordering convention, for the numeral (X) auf der entgegengesetzten Reihenfolge-Konvention für die Ziffer
strings in FF3. Zeichenfolgen in FF3.
The Die
PRF PRF
function, specified in Algorithm 4, essentially invokes the Cipher Block Chaining Funktion, die in Algorithmus 4 angegeben, im Wesentlichen ruft die Cipher Block Chaining
encryption mode [ 7] o n the input bit string and returns the final block of the ciphertext; Verschlüsselungsmodus [ 7] o n die Eingangs Bit-String und gibt den letzten Block des Chiffretext; this dies
function is the pseudorandom core of the Feistel round function for FF1.Encrypt and Funktion ist die Pseudozufalls Kern der Runde Funktion Feistel für FF1.Encrypt und
FF1.Decrypt. FF1.Decrypt.
Algorithm 1: Algorithmus 1:
NUM NUM
radix Radix
( X ) (X)
Prerequisite: Voraussetzung:
Base, radix . Basis, Radix.
Input : Input:
Numeral string, X . Numerischen Kette, X.
Output : Ausgang:
Number, x. Nummer, x.
Steps : Schritte aus:
1. Let x = 0. 1. Sei x = 0 ist.
2. 2.
For i from 1 to Für i von 1 bis
LEN LEN
( X ), let x = xradix + X [ i ]. (X), sei x = xRadix + X [i].
3. 3.
Return x . Return x.
Algorithm 2: Algorithmus 2:
STR STR
m m
radix Radix
( x ) (X)
Prerequisites: Voraussetzungen:
Base, radix ; Basis radix;
String length, m . String-Länge, m.
Input : Input:
Number, x , such that x < radix Anzahl, x, mit x <radix
m m
. .
Output : Ausgang:
Numeral string, X. Numerischen Kette, X.
Steps : Schritte aus:
1. For i from 1 to m : 1. Für i von 1 bis m:
i. i.
X [ m +1- i ] = x mod radix X [m + 1-i] = x mod radix
; ;
ii. ii.
x =x/ radix . x =x / radix .
2. Return X . 2. Zurück X.

Page 19 Seite 19
NIST Special Publication 800-38G NIST Special Publica 800-38G
DRAFT ENTWURF
13 13
Algorithm 3: Algorithmus 3:
REV REV
( X ) (X)
Input : Input:
Character string, X . Zeichenkette, X.
Output : Ausgang:
Character string, Y. Zeichenkette, Y.
Steps : Schritte aus:
1. For i from 1 to 1. Für i von 1 bis
LEN LEN
( X ) let Y [ i ]= X [ (X) können Y [i] = X [
LEN LEN
( X )+1- i ]. (X) + 1 i].
2. Return Y [0 .. 2. Zurück Y [0 ..
LEN LEN
( X )-1]. (X) -1].
Algorithm 4: Algorithmus 4:
PRF PRF
( X ) (X)
Prerequisites : Voraussetzungen:
Approved, 128-bit block cipher,
CIPH
; ;
Key, K , for the block cipher;
Input :
Nonempty bit string, X , such that
LEN LEN
( X ) is a multiple of 128.
Output :
Block, Y.
Steps : Schritte aus:
1. Let m =
LEN LEN
( X ) / 128.
2. 2.
Partition X into m blocks X
1 1
,…, X
m m
, so that X = X
1 1
|| …|| X
m m
and und
LEN LEN
( X
i ich
) = 128 for all i
from 1 to m .
3. 3.
Let Y
0 0
= 0
128 128
, and for j from 1 to m let Y
j j
= =
CIPH
K K
( Y
j -1
X
j j
). ).
4. Return Y
m m
. .
6 Mode Specifications
The specifications of FF1, FF2, and FF3 are presented in this section, organized into
prerequisites, inputs, outputs, steps, and descriptions of the steps. In addition to the key and
designated cipher function, each mode has prerequisites for the choices of the base, radix , and of
the range of lengths, [ minlen .. maxlen ], for the numeral string inputs that the implementation
supports. FF1 and FF2 also have a prerequisite for the choice of the maximum tweak length,
maxTlen , that the implementation supports, and FF2 has an additional parameter, tweakradix , for
the choice of the base for tweak strings. For all of these parameters, the choices that are allowed
for the individual modes are described within the prerequisites.
The parameter choices may affect interoperability. The behavior of an implementation when
presented with incorrect inputs is out of the scope of this Recommendation.

Page 20 Seite 20
NIST Special Publication 800-38G
DRAFT ENTWURF
14 14
6.1 FF1
The specifications for the FF1.Encrypt and FF1.Decrypt functions are given in Algorithms 5 and
6 below. The tweak, T , is optional in that it may be the empty string, with byte length t= 0.
The parameters radix , minlen , maxlen , and maxTlen in FF1.Encrypt and FF1.Decrypt shall meet
the following requirements:
radix ∈ [2 .. 2
16 16
];
radix
minlen
100;
minlen ≥ 2;
maxlen < 2
32 32
; ; and und
maxTlen < 2
32 32
. .
Algorithm 5: FF1.Encrypt( K , T , X )
Prerequisites: Voraussetzungen:
Approved, 128-bit block cipher,
CIPH
; ;
Key, K , for the block cipher;
Base, radix , for the character alphabet;
Range of supported message lengths, [ minlen .. maxlen ];
Maximum byte length for tweaks, maxTlen .
Inputs :
Character string, X , in base radix of length n such that n ∈ [ minlen .. maxlen ];
Tweak T , a byte string of byte length t , such that t ∈ [0 .. maxTlen ] .
Output :
Character string, Y, such that
LEN LEN
( Y ) = n.
Steps : Schritte aus:
1. 1.
Let u =  n /2; v = nu .
2. Let A = X [1 .. u ]; B = X [ u + 1 .. n ].
3. 3.
Let b =   v
LOG LOG
2 2
( radix ) / 8; d = 4  b/ 4 + 4
4. 4.
Let P = [1]
1 1
|| [2]
1 1
|| [1]
1 1
|| [ radix ]
3 3
|| [10]
1 1
|| [ u mod 256]
1 1
|| [ n ]
4 4
|| [ t ]
4 4
. .
5. 5.
For i from 0 to 9:
i. i.
Let Q = T || [0]
( −t−b− 1) mod 16
|| [ i ]
1 1
|| [
NUM NUM
radix
( B )]
b b
. .
ii. ii.
Let R =
PRF
( P || Q ).
iii. iii. Let S be the first d bytes of the following string of ⌈ d /16⌉ blocks:
R ||
CIPH
K K
( R ⊕ [1]
16 16
) ||
CIPH
K K
( R ⊕ [2]
16 16
) || ||
CIPH
K K
( R ⊕ [⌈ d /16⌉ -1]
16 16
). ).
iv. Let y =
NUM NUM
2 2
( S ).
v. v.
If i is even, let m = u ; else, let m = v .
vi. Let c = (
NUM NUM
radix
( A ) + y ) mod radix
m m
. .
vii. Let C =
STR STR
m m
radix
( c ).

Page 21 Seite 21
NIST Special Publication 800-38G
DRAFT ENTWURF
15 15
viii. viii. Let A = B .
ix. ix. Let B = C .
6. 6.
Return A || B .
Description Beschreibung
The “split” of the numeral string X into two substrings, A and B , is performed in Steps 1 and 2.
If n is even,
LEN LEN
( A )=
LEN LEN
( B ); otherwise, andernfalls
LEN LEN
( A )=
LEN LEN
( B )–1. The byte lengths b and d , which are
used in Steps 5i and 5iii, are defined in Step 3.
6 6
A fixed block, P , used as the initial block for the
invocation of the function
PRF
in Step 5ii, is defined in Step 4. An iteration loop for the ten
Feistel rounds of FF1 is initiated in Step 5, executing nine substeps for each round, as follows:
The tweak, T , the substring, B , and the round number, i , are encoded as a binary string, Q , in
Step 5i. The function
PRF
is applied to the concatenation of P and Q in Step 5ii, to produce a
block, R , which is either truncated or expanded to a byte string, S , with the appropriate number
of bytes, d , in Step 5iii. (In Figure 1 Error! Reference source not found. , S corresponds to the
output of F
K K
.) In Steps 5iv to 5vii, S is combined with the substring A to produce a numeral string
C in the same base and with the same length. (In Figure 1, the combining of S with A is indicated
by the “+” operation.) In particular, in Step 5iv, S is converted to a number, y . In Step 5v, the
length , m , of A for this Feistel round is determined. In Step 5vi, y is added to the number
represented by the substring A and the result is reduced modulo the m th power of radix , yielding
a number, c , which is converted to a numeral string in Step 5vii. In Steps 5viii and 5ix, the roles
of A and B are swapped for the next round: the substring B is renamed as the substring A , and the
modified A (ie, C ) is renamed as B .
This completes one round of the Feistel structure in FF1. After the tenth round, the concatenation
of A and B is returned as the output in Step 6.
Algorithm 6: FF1.Decrypt( K , T , X )
Prerequisites: Voraussetzungen:
Approved, 128-bit block cipher,
CIPH
; ;
Key, K , for the block cipher;
Base, radix , for the character alphabet;
Range of supported message lengths, [ minlen .. maxlen ];
Maximum byte length for tweaks, maxTlen .
Inputs :
Numeral string, X , in base radix of length n such that n ∈ [ minlen .. maxlen ];
Tweak byte string, T , of byte length t such that t ∈ [0 .. maxTlen ] .
Output :
Numeral string, Y, such that
LEN LEN
( Y ) = n.
6 6
When B is encoded as a byte string in Step 5i, b is the number of bytes in the encoding. The definition of d ensures
that the output of the Feistel round function is at least 4 bytes longer than this encoding of B , which minimizes any
bias in the modular reduction in Step 5vi.

Page 22 Seite 22
NIST Special Publication 800-38G
DRAFT ENTWURF
16 16
Steps : Schritte aus:
1. 1.
Let u =  n /2; v = nu .
2. Let A = X [1 .. u ]; B = X [ u + 1 .. n ].
3. 3.
Let b =   v
LOG LOG
2 2
( radix )  / 8; d = 4  b/ 4 + 4
4. 4.
Let P = [1]
1 1
|| [2]
1 1
|| [1]
1 1
|| [ radix ]
3 3
|| [10]
1 1
[ u mod 256]
1 1
|| [ n ]
4 4
|| [ t ]
4 4
. .
5. 5.
For i from 9 to 0:
i. i.
Let Q = T || [0]
( −t−b− 1) mod 16
|| [ i ]
1 1
|| [
NUM NUM
radix
( B )]
b b
. .
ii. ii.
Let R =
PRF
( P || Q ).
iii. iii. Let S be the first d bytes of the following string of ⌈ d /16⌉ blocks:
R ||
CIPH
K K
( R ⊕ [1]
16 16
) ||
CIPH
K K
( R ⊕ [2]
16 16
) || ||
CIPH
K K
( R ⊕ [⌈ d /16⌉ -1]
16 16
). ).
iv. Let y =
NUM NUM
2 2
( S ).
v. v.
If i is even, let m = u ; else, let m = v .
vi. vi. Let c = (
NUM NUM
radix
( A ) – y ) mod radix
m m
. .
vii. Let C =
STR STR
m m
radix
( c ).
viii. viii. Let A = B .
ix. ix. Let B = C .
6. 6.
Return A || B .
Description :
The FF1.Decrypt algorithm is almost identical to the FF1.Encrypt algorithm; the only differences
are in Step 5, where the order of the indices is reversed, and in Step 5vi, where modular addition
is replaced by modular subtraction.
6.2 FF2
The specifications for the FF2.Encrypt and FF2.Decrypt functions are given in Algorithms 7 and
8 below. The tweak, T , is optional in that it may be the empty string, with byte length t= 0.
The parameters radix , tweakradix , minlen , maxlen , and maxTlen in FF2.Encrypt and
FF2.Decrypt shall meet the following requirements:
radix ∈ [2 .. 2
8 8
];
tweakradix ∈ [2 .. 2
8 8
];
radix
minlen
100;
minlen ≥ 2;
maxlen ≤ 2120/
LOG LOG
2 2
( radix ) if radix is a power of 2;
maxlen ≤ 298/
LOG LOG
2 2
( radix ) if radix is not a power of 2; and und
maxTlen < 104/
LOG LOG
2 2
( tweakradix ).
Algorithm 7: FF2.Encrypt( K , T , X )
Prerequisites :
Approved, 128-bit block cipher,
CIPH
; ;

Page 23 Seite 23
NIST Special Publication 800-38G
DRAFT ENTWURF
17 17
Key, K , for the block cipher;
Base, radix , for the character alphabet;
Base, tweakradix , for the tweak character alphabet;
Range of supported message lengths, [ minlen .. maxlen ]
Maximum supported tweak length, maxTlen .
Inputs :
Numeral string, X , in base radix of length n such that n ∈ [ minlen .. maxlen ];
Tweak numeral string, T , in base tweakradix of length t such that t ∈ [0 .. maxTlen ].
Output :
Numeral string, Y, such that
LEN LEN
( Y ) = n.
Steps : Schritte aus:
1. 1.
Let u =  n /2; v = nu .
2. Let A = X [1 .. u ]; B = X [ u + 1 .. n ].
3. 3.
If t >0, P = [ radix ]
1 1
|| [ t ]
1 1
|| [ n ]
1 1
|| [
NUM NUM
tweakradix
( T )]
13 13
; ; else P = [ radix ]
1 1
|| [0]
1 1
|| [ n ]
1 1
|| [0]
13 13
. .
4. 4.
Let J =
CIPH
K K
( P )
5. 5.
For i from 0 to 9:
i. i.
Let Q ← [ i ]
1 1
|| [
NUM NUM
radix
( B )]
15 15
ii. ii.
Let Y ←
CIPH
J J
( Q ).
iii iii
Let y ←
NUM NUM
2 2
( Y ).
iv. If i is even, let m = u ; else, let m = v .
v. v.
Let c = (
NUM NUM
radix
( A ) + y ) mod radix
m m
. .
vi. vi. Let C =
STR STR
m m
radix
( c ).
vii. Let A = B .
viii. viii. Let B = C .
6. 6.
Return A || B .
Description :
The “split” of the numeral string X into two substrings, A and B , is performed in Steps 1 and 2.
If n is even,
LEN LEN
( A )=
LEN LEN
( B ); otherwise, andernfalls
LEN LEN
( A )=
LEN LEN
( B )–1. A fixed block, P , is defined in Step 3
from encodings of the base, radix , and the tweak, T . The block cipher under the key K , ie,
CIPH
K K
, is applied to P in Step 4 to produce a 128-bit subkey, J . An iteration loop for the ten
Feistel rounds of FF2 is initiated in Step 5, executing eight substeps for each round, as follows:
The substring, B , and the round number, i , are encoded as a binary string, Q , in Step 5i. The Die
block cipher under the subkey J is applied to Q in Step 5ii to produce a block, Y . (In Error!
Reference source not found. , Y corresponds to the output of F
K K
.) In Steps 5iii to 5vi, Y is
combined with the substring A to produce a numeral string C in the same base and with the same
length. Länge. (In Figure 1, the combining of Y with A is indicated by the “+” operation.) In particular,
in Step 5iii, Y is converted to a number, y . In Step 5iv, the length, m , of A for this Feistel round is
determined, and in Step 5v, the number y is reduced modulo the m th power of the base radix . In In
Step 5v, the number y is added to the number represented by the substring A and the result is
reduced modulo the m th power of radix , yielding a number, c , which is converted to a numeral

Page 24 Seite 24
NIST Special Publication 800-38G
DRAFT ENTWURF
18 18
string in Step 5vi. In Steps 5vii and 5viii, the roles of A and B are swapped for the next round:
the substring B is renamed as the substring A , and the modified A (ie, C ) is renamed as B .
This completes one round of the Feistel structure in FF2. After the tenth round, the concatenation
of A and B is returned as the output in Step 6.
Algorithm 8: FF2.Decrypt( K , T , X )
Prerequisites: Voraussetzungen:
Approved, 128-bit block cipher,
CIPH
; ;
Key, K , for the block cipher;
Base, radix , for the character alphabet;
Base, tweakradix , for the tweak character alphabet;
Range of supported message lengths, [ minlen .. maxlen ]
Maximum supported tweak length, maxTlen .
Inputs :
Numeral string, X , in base radix of length n such that n ∈ [ minlen .. maxlen ];
Tweak numeral string, T , in base tweakradix of length t such that t ∈ [0 .. maxTlen ].
Output :
Numeral string, Y, such that
LEN LEN
( Y ) = n.
Steps : Schritte aus:
1. 1.
Let u =  n /2; v = nu .
2. Let A = X [1 .. u ]; B = X [ u + 1 .. n ].
3. 3.
If t >0, P = [ radix ]
1 1
|| [ t ]
1 1
|| [ n ]
1 1
|| [
NUM NUM
tweakradix
( T )]
13 13
; ; else P = [ radix ]
1 1
|| [0]
1 1
|| [ n ]
1 1
|| [0]
13 13
. .
4. 4.
Let J =
CIPH
K K
( P )
5. 5.
For i from 9 to 0:
i. i.
Let Q ← [ i ]
1 1
|| | [
NUM NUM
radix
( B )]
15 15
ii. ii.
Let Y ←
CIPH
J J
( Q ).
iii iii
Let y ←
NUM NUM
2 2
( Y ).
iv. If i is even, let m = u ; else, let m = v .
v. v.
Let z = y mod radix
m m
. .
vi. vi. Let c = (
NUM NUM
radix
( A ) – y ) mod radix
m m
. .
vii. Let C =
STR STR
m m
radix
( c ).
viii. viii. Let A = B .
ix. ix. Let B = C .
6. 6.
Return A || B .
Description :
The FF2.Decrypt algorithm is almost identical to the FF2.Encrypt algorithm: the only differences
are in Step 5, where the order of the indices is reversed, and in Step 5v, where modular addition
is replaced by modular subtraction.

Page 25 Seite 25
NIST Special Publication 800-38G
DRAFT ENTWURF
19 19
6.3 FF3
The specifications for the FF3.Encrypt and FF3.Decrypt functions are given in Algorithms 9 and
10 below.
The parameters radix , minlen , and maxlen in FF3.Encrypt and FF3.Decrypt shall meet the
following requirements:
radix ∈ [2 .. 2
16 16
];
radix
minlen
100;
minlen ≥ 2; and und
maxlen
2 2
log
radix
(2 (2
96 96
).
Algorithm 9: FF3.Encrypt( K , T , X )
Prerequisites: Voraussetzungen:
Approved, 128-bit block cipher,
CIPH
; ;
Key, K , for the block cipher;
Base, radix , for the character alphabet such that radix ∈ [2 .. 2
16 16
];
Range of supported message lengths, [ minlen .. maxlen ], such that minlen ≥ 2 and maxlen
2 2
log
radix
(2 (2
96 96
)].
Inputs :
Numeral string, X , in base radix of length n such that n ∈ [ minlen .. maxlen ];
Tweak bit string, T , such that
LEN LEN
( T ) = 64.
Output :
Numeral string, Y, such that
LEN LEN
( Y ) = n.
Steps : Schritte aus:
1. 1.
Let u = ⌈ n /2⌉ ; v = nu .
2. Let A = X [1 .. u ]; B = X [ u + 1 .. n ].
3. 3.
Let T
L L
= T [0..31] and T
R R
= T [32..63]
4. 4.
For i from 0 to 7:
i. i.
If i is even, let m = u and W = T
R R
, else let m = v and W =T
L L
. .
ii. ii.
Let P =
REV REV
([
NUM NUM
radix
( (
REV REV
( B ))]
12 12
) || W
REV REV
([ i ]
4 4
). ).
iii iii
Let Y =
CIPH
K K
( P ).
iv. Let y =
NUM NUM
2 2
( (
REV REV
( Y )).
v. v.
Let c = (
NUM NUM
radix
( (
REV REV
( A )) + y ) mod radix
m m
. .
vi. vi. Let C =
REV REV
( (
STR STR
m m
radix
( c )).
vii. Let A = B .
viii. viii. Let B = C .
5. 5.
Return A || B .
Description :
The “split” of the numeral string X into two substrings, A and B , is performed in Steps 1 and 2.

Page 26 Seite 26
NIST Special Publication 800-38G
DRAFT ENTWURF
20 20
If n is even,
LEN LEN
( A )=
LEN LEN
( B ); otherwise, andernfalls
LEN LEN
( A )=
LEN LEN
( B )+1.
7 7
The tweak, T , is partitioned into a
32-bit left tweak, T
L L
, and a 32-bit right tweak, T
R R
, in Step 3. An iteration loop for the eight Feistel
rounds of FF3 is initiated in Step 4, executing eight substeps for each round, as follows:
In Step 4i, the parity of the round number, i , determines the length, m , of the substring A , and
whether T
L L
or T
R R
will be used as W in Step 4ii, in which a 32-bit encoding of i , XORed with W , is
concatenated with a 96-bit encoding of B to produce a block, P . In Step 4iii, the block cipher
under the key, ie, CIPH
K K
, is applied to P , to produce a block, Y . (In Figure 1, Y corresponds to
the output of F
K K
.) In Steps 4iv to 4vii, Y is combined with the substring A to produce a numeral
string C in the same base and with the same length. (In Figure 1, the combining of Y with A is
indicated by the “+” operation, although this operation is different than for FF1 and FF2 in that
FF3 uses the opposite ordering convention for the conversion of strings to numbers and vice
versa.) In particular, in Step 4iv, Y is converted to a number, y . In Step 4v, the number y is added
to the number represented by the substring A and the result is reduced modulo the m th power of
radix , yielding a number, c , which is converted to a numeral string in Step 5vi. In Steps 4vii and
4viii, the roles of A and B are swapped for the next round: the substring B is renamed as the
substring A , and the modified A (ie, C ) is renamed as B .
This completes one round of the Feistel structure in FF3. After the eighth round, the
concatenation of A and B is returned as the output in Step 5.
Algorithm 10: FF3.Decrypt( K , T , X )
Prerequisites: Voraussetzungen:
Approved, 128-bit block cipher,
CIPH
; ;
Key, K , for the block cipher;
Base, radix , for the character alphabet such that radix ∈ [2 .. 2
16 16
];
Range of supported message lengths, [ minlen .. maxlen ], such that minlen ≥ 2 and maxlen
2 2
log
radix
(2 (2
96 96
).
Inputs :
Numeral string, X , in base radix of length n such that n ∈ [ minlen .. maxlen ];
Tweak bit string, T , such that
LEN LEN
( T ) = 64.
Output :
Numeral string, Y, such that
LEN LEN
( Y ) = n.
Steps : Schritte aus:
1. 1.
Let u = ⌈ n /2⌉ ; v = nu .
2. Let A = X [1 .. u ]; B = X [ u + 1 .. n ].
3. 3.
Let T
L L
= T [0..31] and T
R R
= T [32..63]
4. 4.
For i from 7 to 0:
i. i.
If i is even, let m = u and W = T
R R
, else let m = v and W =T
L L
. .
ii. ii.
Let P =
REV REV
([
NUM NUM
radix
( (
REV REV
( B ))]
12 12
) || W
REV REV
([ i ]
4 4
). ).
7 7
If n is odd, A is one character longer than B , in contrast to FF1 and FF2, where B is one character longer than A .

Page 27 Seite 27
NIST Special Publication 800-38G
DRAFT ENTWURF
21 21
iii iii
Let Y =
CIPH
K K
( P ).
iv. Let y =
NUM NUM
2 2
( (
REV REV
( Y )).
vi. vi. Let c = (
NUM NUM
radix
( (
REV REV
( A )) – y ) mod radix
m m
. .
vii. Let C =
REV REV
( (
STR STR
m m
radix
( c )).
viii. viii. Let A = B .
ix. ix. Let B = C .
5. 5.
Return A || B .
Description :
The FF3.Decrypt algorithm is almost identical to the FF3.Encrypt algorithm: the only differences
are in Step 4, where the order of the indices is reversed, and in Step 4v, where modular addition
is replaced by modular subtraction.
7 Conformance
An implementation may claim conformance to any of the following six functions:
FF1.Encrypt
FF2.Encrypt
FF3.Encrypt
FF1.Decrypt
FF2.Decrypt
FF3.Decrypt
Component functions such as
PRF
are not approved for use independent of these eight functions.
In order to claim conformance with this Recommendation, an implementation of FF1, FF2, or
FF3 must support at least one set of values for its parameters.
Two implementations can only interoperate when they support a common value for the base.
Similarly, two implementations of FF2 can only interoperate when they also support a common
value for the tweak base.
Moreover, each mode has two parameters, minlen and maxlen , that determine the lengths for the
numeral strings that are supported by an implementation of the encryption or decryption function
for the mode. FF1 and FF2 also have a parameter, maxTlen , that determines the lengths of the
tweak strings they support. The selection of these parameters may also affect interoperability.
For every algorithm that is specified in this Recommendation, a conforming implementation may
replace the given set of steps with any mathematically equivalent set of steps. In other words, Mit anderen Worten,
different procedures that produce the correct output for any input are permitted.
8 References
[1] [1]
M. Bellare, P. Rogaway, T. Spies, The FFX Mode of Operation for Format-Preserving
Encryption, Draft 1.1, Natl. Inst. Inst. Stand. Stehen. Technol. Technol. [Web page], http://csrc.nist.gov
/groups/ST/toolkit/BCM/documents/proposedmodes/ffx/ffx-spec.pdf , February, 2010.

Page 28 Seite 28
NIST Special Publication 800-38G
DRAFT ENTWURF
22 22
[2] [2]
M. Bellare, P. Rogaway, T. Spies, Addendum to “The FFX Mode of Operation for
Format-Preserving Encryption”: A parameter collection for enciphering strings of
arbitrary radix and length, Draft 1.0, Natl. Inst. Inst. Stand. Stehen. Technol. Technol. [Web page],
http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/ffx/ffx-spec2.pdf,
September 2010. September 2010.
[3] [3]
E. Brier, T. Peyrin, and J. Stern, BPS: a Format-Preserving Encryption Proposal Natl.
Inst. Inst. Stand. Stehen. Technol. Technol. [Web page], http://csrc.nist.gov/groups/ST/toolkit/BCM/documents
/proposedmodes/bps/bps-spec.pdf.
[4] [4]
M. Liskov, R. Rivest, and D. Wagner. Tweakable block ciphers. CRYPTO 2002,
LNCSvol. 2442, Springer, pp. 31–46, 2002
[5] [5]
M. Luby and C. Rackoff. How to construct pseudorandom permutations from
pseudorandomfunctions. SIAM Journal on Computing, 17(2), pp. 373–386, 1988
[6] [6]
National Institute of Standards and Technology. FIPS 197, The Advanced Encryption
Standard (AES). 2001. 2001.
[7] [7]
National Institute of Standards and Technology. NIST Special Publication 800-38A:
Recommendation for Block Cipher Modes of Operation—Methods and Techniques ,
December, 2001.
[8] [8]
National Institute of Standards and Technology. NIST Special Publication 800-67
Revision 1: Recommendation for the Triple Data Encryption Algorithm (TDEA) Block
Cipher , January, 2012.
[9] [9]
National Institute of Standards and Technology. NIST Special Publication 800-133:
Recommendation for Cryptographic Key Generation , December, 2012.
[10] J. Patarin. Generic attacks on Feistel schemes. Cryptology ePrint report 2008/036.
January24, 2008. Also ASIACRYPT 2001, LNCS vol. 2248, Springer, pp. 222–238,
2001. 2001.
[11] R. Schroeppel. Hasty Pudding Cipher specification. Unpublished manuscript, [Web page]
athttp://richard.schroeppel.name:8015/hpc/hpc-spec, June 1998 (revised May 1999).
[12] T. Spies. Feistel finite set encryption. NIST submission, February 2008.
[13] J. Vance, VAES3 scheme for FFX: An addendum to “The FFX Mode of Operation for
Format-Preserving Encryption”: A parameter collection for encipher strings of arbitrary
radix with subkey operation to lengthen life of the enciphering key, Natl. Inst. Inst. Stand. Stehen.
Technol. Technol.
[Web
page],
http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/
proposedmodes/ffx/ffx-ad-VAES3.pdf.

Page 29 Seite 29
NIST Special Publication 800-38G
DRAFT ENTWURF
23 23
Appendix A: Parameter Choices
The length of the key affects its resistance to brute-force search. The requirement for each mode
that radix
minlen
≥ 100 precludes a generic meet-in-the-middle attack on the Feistel structure [10].
A requirement on maxlen for FF2—namely, that maxlen ≤ 298/
LOG LOG
2 2
( radix ) if radix is not a
power of 2—minimizes the bias in the generation of z.
Otherwise, the choices of the mode parameters, eg, radix , minlen , and maxlen , are determined
by the needs of the application, not by security considerations.
Two potential parameters of the Feistel structure are fixed for FF1, FF2, and FF3, namely, the
number of Feistel rounds and the imbalance, ie, the lengths into which the input numeral string
is split: these were chosen in each case to balance performance requirements and security
considerations. Überlegungen. See H of [1] for a discussion.
For FF1 and FF2, the maximum tweak length parameter, maxTlen , should be chosen to
accommodate non-secret information that may be associated to a plaintext. The security rationale
for tweaks is discussed in Appendix C.
Appendix B: Security Goal
The designers of FFX aimed to achieve strong-pseudorandom permutation (PRP) security for a
conventional block cipher [5] . In the FFX proposal to NIST [1], the designers of FFX cite the
history of cryptographic results concerning Feistel networks as underlying their selection of the
FFX mechanism. They assert that, under the assumption that the underlying round function is a
good pseudorandom function (PRF), contemporary cryptographic results and experience indicate
that FFX achieves cryptographic goals including nonadaptive message-recovery security,
chosen-plaintext, and even PRP-security against an adaptive chosen-ciphertext attack. The Die
quantitative security depends on the number of rounds used, the imbalance, and the adversary's
access to plaintext/ciphertext pairs. See [ 1] f or details.
Appendix C: Tweaks
Tweaks have been supported in stand-alone block ciphers, such as Schroeppel's Hasty Pudding
[11], and the notion was later formalized and investigated by Liskov, Rivest, and Wagner [4].
Tweaks are important for FPE modes, because FPE may be used in settings where the number of
character strings is relatively small. In such settings, the tweak should vary with each instance of
the encryption whenever possible.
For example, suppose that in an application for CCNs the leading six digits and the trailing four
digits need to be available, unencrypted, to the application, so that only the remaining six digits
in the middle of the CCNs are encrypted. There are a million different possibilities for these
middle-six digits, so, in a database of 100 million CCNs, about a hundred distinct CCNs would
be expected to share each possible value for these six digits. If these hundred CCNs were
encrypted with the same tweak, then their ciphertexts would be the same.

Page 30 Seite 30
NIST Special Publication 800-38G
DRAFT ENTWURF
24 24
If, however, the other ten digits had been the tweak for the encryption of the middle-six digits,
then the hundred ciphertexts would almost certainly be different. Therefore, for example,
learning that CCN 123456-123456-9876 encrypts to 123456-770611-9876 would not allow the
decryption of 111111-770611-9999, as the mapping of 123456 to 770611 is specific to the
surrounding digits 123456/9876.
In general, it is recommended to use information that is available and statically associated to a
plaintext as a tweak for that plaintext. Ideally, the non-secret tweak associated to a plaintext is
associated only to that plaintext.
Extensive tweaking means that fewer plaintexts are enciphered under any given tweak. This Dies
corresponds, in the security model that is described in [1], to fewer queries to the target instance
of the encryption. The relevant metric is the maximum number of plaintexts that are encrypted
with the same tweak, which is likely to be significantly less than the total number of plaintexts
enciphered.