![]() | Secure Quick Reliable Login | |
A highly secure, comprehensive, easy-to-use replacement for usernames, passwords, reminders, one-time-code authenticators . . . and everything else. |
SQRL clients require both offline and online storage security:
AES-GCM has been adopted by NIST (National Institute of Standards and Technology). It is present in the IPsec (IP Security) specification and participates in the TLSv1.2 security suites, where it is supported by Firefox and Chrome and recent releases of OpenSSL.
Because all of SQRL's other cryptography is in the public domain, GRC has produced and provides a reference implementation of AES-GCM whose source code is released without any usage restrictions of any kind into the public domain. It was written in platform-neutral 'C' and should be easily compiled for use with SQRL. Included in the source distribution are NIST's six files of algorithm validation test vectors, a PERL utility to compile them into a single binary, and a test harness (gcmtest.c) which validates GRC's implementation against NIST's 47,250 individual test vectors.
Note: After this work was finished the reference LibSodium cryptographic library has added AES-GCM to its suite of security tools. Since SQRL uses LibSodium for several other functions, using the AES-GCM functions from LibSodium now makes the most sense.
Consequently, the individual blocks contained within SQRL's secure storage system are encrypted and authenticated with AES-GCM using a 256-bit key derived from SQRL's EnScrypt algorithm.
SQRL's S4 system uses NULL initialization vectors (IV) for its type 2 and type 3 blocks. AES-GCM, like many block cipher modes using a keyed symmetric cipher, employs an initialization vector nonce. To provide guaranteed privacy, this nonce does not need to be secret, nor even random, but it does need to never repeat under the same key. For its type 2 and type 3 blocks, SQRL's S4 storage system meets this requirement using an implied and fixed initialization vector of all zeros (NULL) because those blocks' AES-GCM encryption keys are never reused when the block is changed and re-encrypted. As detailed below, The type 1 and 2 blocks are keyed by SQRL's Scrypt-based EnScrypt function, which has its own 16-byte random salt. This results in the use of a unique encryption key every time the block is encrypted. The type 3 block is keyed by the identity master key (IMK) which is also derived from a random process and is never reused. The type 1 block does use a randomly obtained IV to allow re-encryption under a new IV after user-interface plaintext settings have been changed and a new matching authentication tag must be created.
But an excess of metadata makes little sense for SQRL's offline static data storage where long term storage robustness and retrievability are the overriding priority. SQRL exports long-term statically encrypted secrets in future-proof printed paper form,so fewer bits means that each bit can be larger. Fewer characters means that each character can be larger. Few bits means there's more room for stronger error correction with its larger overhead, etc.
However, notwithstanding the previous, today's storage format must also provide for future change and expansion. The following format, while simple and minimal, addresses and meets all of these needs.
SQRL's Secure Storage System (S4) incorporates the following features:
|
Type 1 - User access password authenticated & encrypted data
The type 1 S4 block supplies the EnScrypt parameters to convert a user-supplied “local access passcode” into a 256-bit symmetric key, and also contains both the plaintext and encrypted data managed by that password.
Notes:
The type 1 secure storage block includes a set of operational options and settings which allow users to customize the SQRL client's operation to their preferences. These options are stored with the user's identity so that they are changed when the client's logon identity is changed, and so that they may follow the user from platform to platform and from device to device. If SQRL clients standardize upon these options, user convenience will be enhanced:
0x0001 | Check for updates: This requests, and gives the SQRL client permission, to briefly check-in with its publisher to see whether any updates to this software have been made available. Note that GRC's client uses a low overhead DNS query to check for newer versions. | |
0x0002 | Update autonomously: This requests, and gives the SQRL client permission, to automatically replace itself with the latest version when it discovers that a newer version is available. | |
0x0004 | Request SQRL only login: This adds the “option=sqrlonly” string to every client transaction. The presence or lack of presence of this option string in any properly signed client transaction is used to push an update of a server-stored flag that, when set, will subsequently disable all traditional non-SQRL account logon authentication such as username and password. | |
0x0008 | Request no SQRL bypass: This adds the “option=hardlock” string to every client transaction. The presence or lack of presence of this option string in any properly signed client transaction is used to push an update of a server-stored flag that, when set, will subsequently disable all “out of band” (non-SQRL) account identity recovery options such as “what was your favorite pet's name.” | |
0x0010 | Warn of possible MITM attack: When set, this bit instructs the SQRL client to notify its user when the web server indicates that an IP address mismatch exists between the entity that requested the initial logon web page containing the SQRL link URL (and probably encoded into the SQRL link URL's “nut”) and the IP address from which the SQRL client's query was received for this reply. | |
0x0020 | Discard password hint data upon blanking, suspend, etc.: When set, this bit instructs the SQRL client to wash any existing local password and hint data from RAM upon notification that the system is going to sleep in any way such that it cannot be used. This would include sleeping, hibernating, screen blanking, etc. | |
0x0040 | Discard password hint data upon user switching: When set, this bit instructs the SQRL client to wash any existing local password and hint data from RAM upon notification that the current user is being switched. | |
0x0080 | Discard password hint data after system idle: When set, this bit instructs the SQRL client to wash any existing local password and hint data from RAM when the system has been user-idle (no mouse or keyboard activity) for the number of minutes specified by the two-byte idle timeout. | |
0x0100 | Warn of non-CPS authentication: When set, this bit instructs the SQRL client to notify its user whenever a non-CPS authentication is attempted. Since CPS provides extremely strong protection against website spoofing—which is a particularly significant concern for SQRL due to its high degree of automation and presumed automatic provision of security—this flag must default to enabled. |
Type 2 - Rescue code encrypted data
The type 2 S4 block supplies the EnScrypt parameters to convert a user-supplied “emergency rescue code” into a 256-bit symmetric key for use in decrypting the block's embedded encrypted emergency rescue code.
Notes:
Type 3 - Encrypted previous identity unlock keys
Since the type 3 S4 block contains from one to four of the most recently replaced identity unlock keys (PIUKs), the presence of this block type in any SQRL identity is optional. It will only be present when a identity has been rekeyed at least once. When present, this block is encrypted under the current identity's Identity Master Key (IMK). The IMK may be obtained either by decrypting the type 1 block with the user's identity passphrase, or by decrypting the type 2 block with the user's identity RescueCode then “EnHashing” the obtained Identity Unlock Key (IUK) to derive the Identity Master Key (IMK).
SQRL is designed to use extremely long-lived, hopefully perpetual, identity keying where the need to rekey any identity is vanishingly rare. Add to this the fact that authenticating to any site that recognizes a user through one of their previous identity keys autonomously updates that site to the users current key. This will tend to automatically keep websites' identity information current. These facts argue for a modest number of previous keys being sufficient to make the entire rekeying process transparent to all reasonable SQRL users (and even any who are unreasonable).
As shown below, the overall size (length) of the type 3 block will be 54, 86, 118 or 150 bytes depending upon whether it contains one, two, three or four previous identity unlock keys.
Notes:
• If SQRL should evolve in the direction of a form-fill application, that private and probably encrypted data could occupy currently undefined block types without duplicating any of SQRL's existing data. A future encrypted and authenticate block could implicitly infer the use of, for example, the encryption parameters obtained from the existing type 1 block.
![]() | Gibson Research Corporation is owned and operated by Steve Gibson. The contents of this page are Copyright (c) 2024 Gibson Research Corporation. SpinRite, ShieldsUP, NanoProbe, and any other indicated trademarks are registered trademarks of Gibson Research Corporation, Laguna Hills, CA, USA. GRC's web and customer privacy policy. |
Last Edit: Aug 04, 2017 at 09:10 (2,745.75 days ago) | Viewed 1 times per day |