Secure bitstream authentication
09577822 ยท 2017-02-21
Assignee
Inventors
Cpc classification
G09C1/00
PHYSICS
H04L9/32
ELECTRICITY
H04L9/0618
ELECTRICITY
H04L9/003
ELECTRICITY
H04L63/00
ELECTRICITY
H04L9/3242
ELECTRICITY
H04L9/0637
ELECTRICITY
H04L9/0631
ELECTRICITY
International classification
H04L9/30
ELECTRICITY
G06F21/30
PHYSICS
H04L9/06
ELECTRICITY
Abstract
Methods and systems are provided for securely authenticating data of an integrated circuit. By authenticating data having keystream blocks inserted between ciphertext portions, it becomes more difficult to mount successful authentication-based attacks.
Claims
1. A method of authenticating data, the method comprising: interleaving, using interleaving circuitry, a plurality of ciphertext frames with a plurality of keystream portions, to generate a plurality of interleaved frames, wherein each interleaved frame from among the plurality of interleaved frames comprises a respective ciphertext frame from among the ciphertext frames combined with a respective keystream portion from among the plurality of keystream portions; and performing, using authentication circuitry, an authentication operation on the plurality of generated interleaved frames to generate an authentication value, wherein the authentication value authenticates the plurality of ciphertext frames; wherein the method is performed in a programmable device, and wherein the data being authenticated comprises configuration data that configures one or more programmable devices.
2. The method of claim 1, wherein the authentication value comprises a stream authentication tag that authenticates a stream comprising the plurality of ciphertext frames.
3. The method of claim 1, comprising generating, for at least one interleaved frame, a frame authentication tag, wherein the frame authentication tag is generated based on a combination of the ciphertext portion of the interleaved frame and the ciphertext portion of another interleaved frame.
4. The method of claim 2, wherein the plurality of ciphertext frames is authenticated in response to validating the stream authentication tag and validating each frame authentication tag of a plurality of frame authentication tags corresponding to a respective one of the ciphertext frames.
5. The method of claim 3, wherein the frame authentication tag is used one-element-at-a-time to scramble a key value used to authenticate a subsequent ciphertext frame.
6. The method of claim 1, wherein decrypting one ciphertext frame of the plurality of ciphertext frames is delayed until a frame authentication tag for another one of the ciphertext frames has been validated.
7. A system for authenticating data, the system comprising: interleaving circuitry that interleaves a plurality of ciphertext frames with a plurality of keystream portions, to generate a plurality of interleaved frames, wherein each interleaved frame from among the plurality of interleaved frames comprises a respective ciphertext frame from among the plurality of ciphertext frames combined with a respective keystream portion from among the plurality of keystream portions; authentication circuitry that performs an authentication operation on the plurality of generated interleaved frames to generate an authentication value, wherein the authentication value authenticates the plurality of ciphertext frames; and a programmable portion, wherein the data being authenticated comprises a configuration bitstream that programs the programmable portion of one or more programmable devices.
8. The system of claim 7, wherein the authentication value comprises a stream authentication tag that authenticates a stream comprising the plurality of ciphertext frames.
9. The system of claim 7, wherein the interleaving circuitry generates, for at least one interleaved frame, a frame authentication tag, wherein the frame authentication tag is generated based on a combination of the ciphertext portion of the interleaved frame and the ciphertext portion of another interleaved frame.
10. The system of claim 8, wherein the plurality of ciphertext frames is authenticated in response to validating the stream authentication tag and validating each frame authentication tag of a plurality of frame authentication tags corresponding to a respective one of the ciphertext frames.
11. The system of claim 9, wherein the frame authentication tag is used one-element-at-a-time to scramble a key value used to authenticate a subsequent ciphertext frame.
12. The system of claim 7, wherein decrypting one ciphertext frame of the plurality of ciphertext frames is delayed until a frame authentication tag for another one of the ciphertext frames has been validated.
13. The system of claim 7, comprising a programmable portion, wherein the data being authenticated comprises a configuration bitstream programs the programmable portion.
14. A method for authenticating data, the method comprising: de-interleaving a plurality of ciphertext frames to extract an authentication tag; interleaving, using interleaving circuitry, the de-interleaved plurality of ciphertext frames with a plurality of keystream portions, to generate a plurality of interleaved frames, wherein each interleaved frame from among the plurality of interleaved frames comprises a respective ciphertext frame from among the plurality of ciphertext frames combined with a respective keystream portion from among the plurality of keystream portion; authenticating, using authentication circuitry, the interleaved frames to generate a signature tag; comparing the signature tag with the extracted authentication tag; and in response to the signature tag matching the extracted tag, decrypting the ciphertext frames; wherein the method is performed in a programmable device, and wherein the data being authenticated comprises configuration data that configures one or more programmable devices.
15. The method of claim 14, wherein authenticating the interleaved frames to generate the signature tag comprises generating, for at least one interleaved frame of the plurality of interleaved frames, a frame authentication tag, wherein the frame authentication tag is generated based on a combination of the ciphertext portion of the interleaved frame of the plurality of interleaved frames and the ciphertext portion of another interleaved frame of the plurality of interleaved frames.
16. The method of claim 14, wherein the keystream portions are generated based on a constant value.
17. The method of claim 14, wherein the keystream portions are generated based on a previous signature tag.
18. The method of claim 14, wherein decrypting one ciphertext frame of the plurality of ciphertext frames is delayed until a frame authentication tag for another one of the ciphertext frames has been validated.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Further features of the invention, its nature and various advantages will be apparent upon consideration of the following detailed description, taken in conjunction with the accompanying drawings, in which like reference characters refer to like parts throughout, and in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
DETAILED DESCRIPTION OF THE INVENTION
(11)
(12) Encryption/authentication system 122 is merely one example of a system that may be used for carrying out encryption and/or authentication operations disclosed herein, and it should be understood that other configurations are possible without departing from the scope of this disclosure. For example, encryption/authentication system 122 may be implemented in software and/or hardware, using any suitable configuration. In some implementations, encryption/authentication system 122 may be implemented as a standalone encryption system and/or a standalone authentication system that may or may not be coupled. Also, although encryption/authentication system 122 is shown as external to both the memory 120 and device 100, at least parts of encryption/authentication system 122 may be internal to or implemented on either one of the memory 120 and device 100, or may be placed between external memory 120 and device 100 without departing from the scope of this disclosure.
(13) The encrypted/authenticated data stored in external memory 122 is sent to device 100 where it is decrypted/authenticated by a decryption/authentication system 102. The decrypted/authenticated data may then be optionally stored, e.g., in configuration data memory 104. Like encryption/authentication system 122, decryption/authentication system 102 may be implemented in software and/or hardware.
(14) The configuration data is used to configure the functionality of programmable blocks 106. After configuration, the blocks may start operating on input data according to the configuration bitstream. When in operation, the configurable blocks may store internal data, e.g., in data registers, RAM, or other suitable storage. This internal data may reflect specific aspects of the configuration data. For example, in some devices, the internal data may reflect proprietary aspects of the circuit design that the designer may desire to keep secret.
(15) In some embodiments, the security of authentication operations may be increased using various types of interleaving functions and/or de-interleaving functions. These functions may be carried out in interleaver 124 of encryption/authentication system 122 and/or de-interleaver 108 in decryption/authentication system 102. Details of these operations will be disclosed further below.
(16) In some embodiments, the configuration data (in plaintext form) may be encrypted using an encryption cryptographic system that applies a cryptographic algorithm, similar to encryption/authentication system 122. The decryption/authentication system 102 may then decrypt the encrypted data (i.e., ciphertext) using a corresponding decryption cryptographic system that applies the same cryptographic algorithm.
(17)
(18) The common cryptographic algorithm of
(19)
(20) The common authentication algorithm of
(21) Although the remainder of this specification will mainly discuss the HMAC embodiment, it should be understood that embodiments of the invention described herein are applicable to other authentication algorithms as well as to other cryptographic algorithms and modes of operation. As such, discussing the embodiments with respect to HMAC is meant for the purposes of illustration not limitation. Furthermore, although the remainder of this specification will mainly discuss the AES embodiment, it should be understood that embodiments of the invention described herein are applicable to other key lengths and block sizes as well as to other cryptographic algorithms and modes of operation. As such, discussing the embodiments with respect to AES cryptographic algorithm is meant for the purposes of illustration not limitation.
(22) Systems and methods discussed herein may prevent or increase the difficulty for an attacker to spoof authentication tags, e.g., to append a valid authentication block E.sub.N to an unauthorized ciphertext stream {E.sub.1, E.sub.2, . . . , E.sub.N-1}. A valid authentication block E.sub.N will be referred to as a valid spoofed authentication tag, and the combination of the unauthorized ciphertext stream with the tag {E.sub.1, E.sub.2, . . . , E.sub.N-1, E.sub.N} will be referred to as a spoofed frame.
(23) In one aspect, embodiments of the present disclosure may increase the number of side-channel attacks required by an attacker to generate a valid spoofed authentication tag or a valid spoofed frame. Instead of simply authenticating ciphertext blocks as shown in
(24) By interleaving keystream blocks, systems and methods described herein may effectively change the authentication key (i.e., rekey) the authentication algorithm after processing each portion of the data to be authenticated. In this way, mounting successful attacks may require the attacker to trigger each of multiple portions of the data to be authenticated, and not just a single authentication tag. Furthermore, attacks such as spoofing a ciphertext frame may require the attacker to trigger the authentication tag for every spoofed frame. Thus, even if the attacker is able to mount a successful attack against one ciphertext frame, he or she may still fail to create multiple spoofed frames.
(25)
(26) Blocks of data may be grouped to form one or more frames. For the purposes of illustration, the rest of this disclosure will mainly discuss frames having the same number of blocks per frame, e.g., ciphertext frames having N ciphertext blocks per frame and interleaved frames having N ciphertext blocks and 1 keystream block per frame. However, it should be understood that these frames may be of different length and/or contain data portions of any suitable size or type without departing from the scope of this disclosure.
(27)
(28) Although each interleaved frame has one keystream block appended at the end of the frame, it should be understood that different numbers and different positions of the keystream block relative to the ciphertext frame may be used without departing from the scope of the disclosure.
(29) As illustrated in
(30) According to some embodiments, an authentication algorithm, e.g., HMAC, is run on the interleaved stream 390, which includes the combination of ciphertext blocks C.sub.i,j (i.e., the ciphertext stream 392) interleaved with keystream blocks K.sub.i,N. The authentication algorithm may use an internal authentication key 360 to run the authentication operations. By processing the interleaved stream 390, the authentication algorithm generates a stream authentication tag 350. A stream tag herein refers to an authentication value corresponding to multiple frames. In the illustrative case of
(31)
(32) In
(33) Keystream block K.sub.i,N is inserted at the end of the ciphertext frame 421 to create an interleaved frame 423, e.g., as described with reference to
(34) As illustrated in
(35) In the implementation illustrated in
H.sub.i=HASH(H.sub.i-1,C.sub.i,0,C.sub.i,1, . . . ,C.sub.i,N-1,K.sub.i,N).
Because the computation of involves the hash H.sub.i-1 of the previous frame i1, the value of the frame authentication tag 450 (and its encrypted value 470) may depend not only on the interleaved frame 423, but also on one or more previous frames, e.g., frame i1. In one implementation, in order for a ciphertext stream {C.sub.0,0, C.sub.0,1, C.sub.0,N-1, . . . , C.sub.f,0, C.sub.f,1, . . . , C.sub.f,N-1} to be authenticated, each of the individual frame tags C.sub.i,N (i=0, f) must be valid, as well as the stream-level authentication tag, e.g., HMAC(C.sub.0,0, C.sub.0,1, . . . , C.sub.0,N-1, K.sub.0,N . . . , C.sub.f,0, C.sub.f,1, . . . , C.sub.f,N-1, K.sub.f,N).
(36) In some embodiments, the encrypted frame authentication tag may be used one-bit-at-a-time to scramble the keys used to encrypt or authenticate subsequent frames. One-bit-at-a-time scrambling operations are described in U.S. application Ser. No. 14/025,697, filed Sep. 12, 2013, entitled SECURE VARIABLE SCRAMBLING, the content of which is incorporated by reference in its entirety.
(37) In some embodiments, decrypting a ciphertext portion of a frame may be delayed until a subsequent frame has been authenticated. For example, combining the ciphertext portion and the keystream portion for a frame i for the purpose of determining the corresponding plaintext of that frame i may be delayed until the frame authentication tag for a subsequent frame i+1 has been validated.
(38) Systems and methods using frame authentication described herein may increase security of integrated circuits against authentication-based attacks. Because spoofing the frame authentication tag for a frame i will generally scramble the key used to encrypt the frame authentication tag of the subsequent frame (e.g., by affecting hash value H.sub.i), spoofing a frame may require mounting two successful attacks against two authentication tags, the frame tag for the spoofed frame and the encrypted tag for the subsequent frame.
(39) Even if an attacker successfully spoofs a single pair of authentication tags, systems and methods using frame authentication described herein may prevent him or her from creating multiple, other spoofed frames from the spoofed pair of authentication tags. This is because each spoofed frame may now require making other separate, successful attacks on the frame authentication tag of the subsequent frame in order to generate additional spoofed frames.
(40) Several aspects of interleaving/de-interleaving are envisioned in this disclosure. In one aspect, interleaving of data occurs when data is encrypted, e.g., before the configuration data of
(41) According to this aspect of interleaving, the interleaving process includes encrypting the plaintext to create ciphertext, interleaving the ciphertext with keystream data, authenticating the interleaved ciphertext and keystream data to compute an encrypted authentication tag, and then interleaving the ciphertext with the resulting encrypted authentication tag (which may replace the previously interlaced keystream data). Embodiments of this process are shown in
(42)
(43) Process 500 processes and generates data, similar to plaintext blocks, ciphertext blocks and/or keystream blocks of
(44) Plaintext 502 is encrypted at 504 to generate ciphertext data 505. For example, plaintext blocks P.sub.i,j=0 . . . N-1, such as those of
(45) A constant value 506 is encrypted at 508 to generate keystream data 509. For example, the constant value may be a random or pseudo-random seed value, or may be provided by the user. Keystream data 509 may include keystream block K.sub.i,N, which may be similar to keystream block K.sub.i,N of
(46) The ciphertext data 505 and keystream data 509 are interleaved at 510. The interleaving operation block 510 may be implemented in software and/or hardware, and may be implemented using any suitable circuitry, such as multiplexors, logic gates, buffers, shifters, etc. This first interleaving generates interleaved ciphertext and keystream data, e.g., similar to interleaved ciphertext frame 423 of
(47) The interleaved ciphertext and keystream data is authenticated at 512 to generate an authentication frame tag T.sub.i, e.g., similar to frame authentication tag 450 of
(48) The frame authentication tag T.sub.i is optionally encrypted at 514 to generate an encrypted authentication tag, e.g., similar to encrypted frame authentication tag C.sub.i,N 470 of
(49) The ciphertext data 505 output from encryption operation block 504 and the (optionally encrypted) authentication tag output from authentication operation block 512 are interleaved at 516. This second interleaving may be implemented similarly to the first interleaving. This second interleaving generates authenticated interleaved ciphertext data C.sub.i,j=0 . . . N, e.g., similar to authenticated interleaved ciphertext frame 425 of
(50) According to another interleaving/de-interleaving aspect, interleaving of data occurs when data is decrypted, e.g., by decryption/authentication system 102 of
(51) Operations related to this aspect of interleaving/de-interleaving are generally implemented in hardware such as the one represented by decryption/authentication system 102 of
(52)
(53) Process 600 processes and generates blocks data, similar to plaintext blocks, ciphertext blocks and/or keystream blocks of
(54) Ciphertext 602 is de-interleaved at 604 to extract authentication data C.sub.i,N and ciphertext data C.sub.i,j=0 . . . N-1. For example, an authenticated interleaved frame similar to frame 425 of
(55) If the implementation of process 600 generates an encrypted authentication tag 605, then an optional decryption operation block 612 decrypts the authentication tag 605 to generate an unencrypted authentication tag T.sub.i,N 613.
(56) The ciphertext blocks C.sub.i,j=0 . . . N-1 are interleaved at 614 with keystream blocks 607 to generate combined ciphertext and keystream data. The keystream data may be generated similarly to process 500 of
(57) The interleaved combination of ciphertext and keystream data is authenticated at 616 by generating a ciphertext signature tag 617, using, e.g., HMAC or any suitable authentication function.
(58) Comparison operation block 618 validates the signature tag, based on comparing:
(59) (1) the decrypted authentication tag 613, extracted from the ciphertext based on the de-interleaving operation at 604; and
(60) (2) the ciphertext signature tag 617, generated based on the interleaving operation at 614.
(61) If the ciphertext signature tag 617 matches the decrypted authentication tag 613, then the ciphertext is determined to be authentic and is decrypted at 620 to generate plaintext 622. If the ciphertext signature tag 617 does not match the decrypted authentication tag 613, then no decryption may be performed.
(62) In some embodiments, rather than comparing the decrypted authentication tag 613 and the ciphertext signature tag 617, the encrypted authentication tag and an encrypted version of the ciphertext signature tag may be compared.
(63) (1) the encrypted authentication tag 705, extracted from the ciphertext based on de-interleaving at 704; and
(64) (2) the encrypted ciphertext signature tag 713, generated based on encrypting (at 712) the result of interleaving (at 714) the ciphertext data 706 with the keystream data 707.
(65) In some embodiments, keystream data may be generated using a variable instead of a constant (e.g., such as constants 506 of
(66) In particular,
(67)
(68) It will be understood that the above steps of processes 500, 600, 700, 800, and 900 of
(69) Although embodiments of this disclosure discuss a software implementation of a first aspect of interleaving (that generates authenticated interleaved encrypted data) and a hardware implementation of a second aspect of interleaving (that checks the authenticity of interleaved data), this is for the purpose of limitation not limitation and any suitable hardware and/or software implementation may be used without departing from the scope of this disclosure.
(70) The encryption/authentication operation implementations described herein may belong to a single processing device or a plurality of processing devices. Such an implementation may have a microprocessor, micro-controller, digital signal processor, microcomputer, central processing unit, field programmable gate array, programmable logic device, state machine, logic circuitry, analog circuitry, digital circuitry, and/or any device that manipulates signals (analog and/or digital) based on hard coding of the circuitry and/or operational instructions.
(71) It will be understood that the foregoing is only illustrative of the principles of the invention, and that various modifications can be made by those skilled in the art without departing from the scope and spirit of the invention. For example, the various elements of this invention can be provided on a device in any desired number and/or arrangement. One skilled in the art will appreciate that the present invention can be practiced by other than the described embodiments, which are presented for purposes of illustration and not of limitation, and the present invention is limited only by the claims that follow.