RFC 6508

Sakai-Kasahara Key Encryption (SAKKE)

๐Ÿ“… published February 2012, from ietf

RFC 6508: Sakai-Kasahara Key Encryption (SAKKE) ๐ŸŽ€

Okay bestie, here's the title block ๐Ÿ’… This one is from the Internet Engineering Task Force (IETF). M. Groves from CESG wrote it. It's Informational, which means it's published for info and isn't a Standards Track spec ๐Ÿงš It's dated February 2012, and it's ISSN 2070-1721. The title block doesn't list anything it obsoletes or updates.

Abstract โœจ

Okay so this doc describes the Sakai-Kasahara Key Encryption (SAKKE) algorithm ๐Ÿฆ‹ It uses Identity-Based Encryption to pass a shared secret from a Sender to a Receiver. Iconic. ๐Ÿ’œ

Status of This Memo ๐Ÿ“œ

Real talk, this is not an Internet Standards Track spec. It's published purely for informational purposes ๐ŸŒธ

It's still an official IETF product, and the IESG approved it for publication. Not every IESG-approved doc is a candidate for an Internet Standard, though. See Section 2 of RFC 5741 for that ๐Ÿ’…

If you want the current status, any errata, or a way to send feedback, check http://www.rfc-editor.org/info/rfc6508 ๐Ÿซถ

Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved. ๐Ÿ”ฅ

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stand on the publication date. Please actually read these, bestie, because they spell out your rights and restrictions for this doc ๐Ÿ™ˆ

Any Code Components pulled out of this document must include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions. They come with no warranty, same as the Simplified BSD License says โญ

Table of Contents ๐Ÿ“š

   1. Introduction ....................................................2
      1.1. Requirements Terminology ...................................3
   2. Notation and Definitions ........................................3
      2.1. Notation ...................................................3
      2.2. Definitions ................................................5
      2.3. Parameters to Be Defined or Negotiated .....................6
   3. Elliptic Curves and Pairings ....................................7
      3.1. E(F_p^2) and the Distortion Map ............................7
      3.2. The Tate-Lichtenbaum Pairing ...............................7
   4. Representation of Values ........................................9
   5. Supporting Algorithms ..........................................10
      5.1. Hashing to an Integer Range ...............................10
   6. The SAKKE Cryptosystem .........................................11
      6.1. Setup .....................................................11
           6.1.1. Secret Key Extraction ..............................11
           6.1.2. User Provisioning ..................................11
      6.2. Key Exchange ..............................................12
           6.2.1. Sender .............................................12
           6.2.2. Receiver ...........................................12
      6.3. Group Communications ......................................13
   7. Security Considerations ........................................13
   8. References .....................................................15
      8.1. Normative References ......................................15
      8.2. Informative References ....................................15
   Appendix A. Test Data..............................................17

1. Introduction โœจ

Okay so this doc defines an efficient way to use Identity-Based Encryption (IBE) built on bilinear pairings ๐Ÿงš It describes the Sakai-Kasahara IBE cryptosystem [S-K] for setting up a shared secret value. It also adds to the IBE options already in [RFC5091], giving you an efficient primitive plus an extra family of curves. Main character energy ๐Ÿ‘‘

This doc sticks to one particular family of curves (see Section 2.1). Those curves have a simple, efficient way to calculate the pairing that Sakai-Kasahara IBE is built on ๐Ÿ’–

Now the IBE part, which is so cool. In IBE, public and private keys can be derived from Identifiers. The Identifier can even be viewed as the equivalent of a public key or certificate in a regular public key system. The difference is that in IBE, both Sender and Receiver can form the Identifier ๐Ÿฆ‹ That means you don't need a third party to hand out public keys, and you don't have to send certified public keys every time a session starts. Keys can also be calculated whenever they're needed, and messages can be sent to users who haven't enrolled yet. Iykyk ๐Ÿ™ˆ

The Sakai-Kasahara primitive in this doc supports simplex transmission of messages from a Sender to a Receiver ๐ŸŒˆ The elliptic curve pairing it's built on keeps implementations simple and efficient. Slay ๐Ÿ’…

The Sakai-Kasahara Key Encryption scheme in this doc is drawn from the Sakai-Kasahara Key Encapsulation Mechanism (SK-KEM) scheme. That one was modified to support multi-party communications and submitted to the IEEE P1363 Working Group in [SK-KEM] ๐ŸŽ€

1.1. Requirements Terminology ๐Ÿ“

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this doc are to be interpreted as described in [RFC2119]. These are the official requirement words, so they're worth knowing ๐Ÿซถ

2. Notation and Definitions ๐Ÿงฎ

2.1. Notation ๐Ÿ”ข

Okay, this is the notation list, and it's kind of the backbone of the whole doc. Here's the vibe for each symbol ๐Ÿ’œ

  • n: A security parameter. It's the size of the symmetric keys, in bits, that get exchanged by SAKKE.
  • p: A prime, and it's the order of the finite field F_p. In this doc, p is always congruent to 3 modulo 4 โœจ
  • F_p: The finite field of order p.
  • F*: The multiplicative group of the non-zero elements in the field F. For example, (F_p)* is the multiplicative group of the finite field F_p.
  • q: An odd prime that divides p + 1. To get the security level we want, lg(q) MUST be greater than 2*n ๐Ÿ”ฅ
  • E: An elliptic curve defined over F_p, with a subgroup of order q. This doc uses supersingular curves with the equation y^2 = x^3 - 3 * x modulo p. The curve is picked for its efficiency and simplicity, which are super nice ๐ŸŒธ The -3 coefficient of x also gives advantages for elliptic curve arithmetic, and [P1363] explains them. Another reason for this curve is that Barreto's trick [Barreto] applies. It eliminates the computation of the denominators when calculating the pairing, so you save work ๐Ÿงš
  • E(F): The additive group of points with affine coordinates (x,y), where x and y are in the field F and satisfy the curve equation for E ๐Ÿ’–
  • P: A point of E(F_p) that generates the cyclic subgroup of order q. Its coordinates are P = (P_x,P_y). These coordinates are in F_p, and they satisfy the curve equation ๐Ÿฆ‹
  • 0: The null element of any additive group of points on an elliptic curve. It's also called the point at infinity โœจ
  • F_p^2: The degree 2 extension field of F_p. This doc uses one specific version of it, where F_p^2 = F_p[i] and i^2 + 1 = 0 ๐ŸŽ€
  • PF_p: The projectivization of F_p. It's defined as (F_p^2)*/(F_p)*. Heads up, PF_p is cyclic and has order p + 1, which is divisible by q ๐Ÿ‘‘
  • G[q]: The q-torsion of a group G. It's the subgroup generated by points of order q in G ๐ŸŒˆ
  • < , >: A version of the Tate-Lichtenbaum pairing. In this doc, it's a bilinear map from E(F_p)[q] x E(F_p)[q] onto the subgroup of order q in PF_p. The full definition is in Section 3.2 ๐Ÿงš
  • Hash: A cryptographic hash function ๐Ÿซถ
  • lg(x): The base 2 logarithm of the real value x ๐Ÿ“

Here are the conventions assumed for curve operations ๐Ÿ“

  • Point addition: If A and B are two points on a curve E, their sum is written A + B ๐Ÿ’…
  • Scalar multiplication: If A is a point on a curve and k is an integer, adding A to itself a total of k times is written [k]A โœจ

Next, here's how the mathematical objects get represented ๐Ÿง 

  • Elements of F_p: The p elements are represented directly by the integers from 0 to p-1 ๐Ÿ”ข
  • Elements of F_p^2: The elements of F_p^2 = F_p[i] are written as x_1 + i * x_2, where x_1 and x_2 are elements of F_p ๐Ÿฆ‹
  • Elements of PF_p: These are cosets of (F_p)* in (F_p^2)*. Every element of F_p^2 can be written unambiguously as x_1 + i * x_2, where x_1 and x_2 are in F_p. So elements of PF_p (except the unique element of order 2) can be represented unambiguously by x_2/x_1 in F_p. Since q is odd, every element of PF_p[q] can be represented by an element of F_p this way ๐Ÿ’œ

This way of representing PF_p[q] elements makes the group operations efficient, because they can be defined with plain arithmetic in F_p ๐ŸŒธ If a and b are elements of F_p representing A and B in PF_p[q], then A * B in PF_p[q] is represented by (a + b)/(1 - a * b) in F_p ๐Ÿ”ฅ

2.2. Definitions

okay bestie, time for the vocab ๐Ÿ’…โœจ every term here is a building block, so let's go one by one ๐ŸŽ€

Identifier - Every user of an IBE system MUST have a unique, unambiguous identifying string that anyone valid can easily work out ๐Ÿฆ‹ That string is the user's Identifier. An Identifier is an integer in the range 2 to q-1. The method for forming Identifiers MUST be defined for each application ๐Ÿ’œ

Key Management Service (KMS) - The KMS is a trusted third party for the IBE system ๐Ÿงš It derives the system secrets and hands out key material to the people who are allowed to get it. Applications MAY support mutual communication between the users of multiple KMSs. We write KMSs as KMS_T, KMS_S, and so on ๐ŸŒธ

Public parameters - The public parameters are a set of values that every user of an IBE system holds ๐ŸŒˆ The system MAY contain multiple KMSs. Each application of SAKKE MUST define the set of public parameters it uses. The parameters needed are p, q, E, P, g=<P,P>, Hash, and n โœจ

Master Secret (z_T) - The Master Secret z_T is the master key that KMS_T generates and keeps private ๐Ÿ”’ It uses this key to generate the private keys of the users it provisions. It's an integer in the range 2 to q-1 ๐Ÿ‘‘

KMS Public Key: Z_T = [z_T]P - The KMS Public Key Z_T is used to form Public Key Establishment Keys for every user provisioned by KMS_T ๐Ÿ’… It's a point of order q in E(F_p). It MUST be provisioned by KMS_T to everyone who is authorized to send messages to users of the IBE system. No drama, just a must ๐Ÿซถ

Receiver Secret Key (RSK) - Every user enrolled in an IBE system gets a Receiver Secret Key from its KMS ๐ŸŽ€ The RSK given to a user with Identifier 'a' by KMS_T is written K_(a,T). In SAKKE, the RSK is a point of order q in E(F_p) ๐Ÿฆ‹

Shared Secret Value (SSV) - The whole point of SAKKE is that the Sender securely sends a shared secret value to the Receiver ๐Ÿ” The SSV is an integer in the range 0 to (2^n) - 1 โœจ

Encapsulated Data - Encapsulated Data is how the secret info gets sent safely to the Receiver ๐Ÿ’Œ It can be computed straight from the Receiver's Identifier, the public parameters, the KMS Public Key, and the SSV being sent. In SAKKE, the Encapsulated Data is a point of order q in E(F_p) plus an integer in the range 0 to (2^n) - 1. It's formatted as described in Section 4 ๐ŸŒธ


2.3. Parameters to Be Defined or Negotiated

okay so, for an application to actually use the SAKKE algorithm, the communicating hosts MUST agree on values for several of the parameters we just covered ๐Ÿค The curve equation (E) and the pairing (< , >) are constant and used for every application, so those are already sorted ๐Ÿ’–

For the following parameters, each application MUST either define an application-specific constant value OR define a mechanism for hosts to negotiate a value ๐Ÿงš Here's the list:

  • n
  • p
  • q
  • P = (P_x,P_y)
  • g = <P,P>
  • Hash

3. Elliptic Curves and Pairings

okay this is where the math gets spicy ๐Ÿ”ฅ E is a supersingular elliptic curve (of j-invariant 1728) ๐Ÿ’œ E(F_p) has a cyclic subgroup of order q, written E(F_p)[q]. The bigger object, E(F_p^2), contains the direct product of two cyclic subgroups of order q, written E(F_p^2)[q] โœจ

P is a generator of E(F_p)[q] ๐Ÿฆ‹ It's specified by the (affine) coordinates (P_x,P_y) in F_p, and those coordinates satisfy the curve equation.

Routines for point addition and doubling on E(F_p) can be found in Appendix A.10 of [P1363] ๐ŸŽ€


3.1. E(F_p^2) and the Distortion Map

if (Q_x,Q_y) are (affine) coordinates in F_p for some point (called Q) on E(F_p)[q], then (-Q_x,iQ_y) are (affine) coordinates in F_p^2 for some point on E(F_p^2)[q] ๐ŸŒˆ That latter point is written [i]Q, by analogy with the scalar multiplication definition. The two points P and [i]P together generate E(F_p^2)[q] ๐Ÿ’… The map [i]: E(F_p) -> E(F_p^2) is sometimes called the distortion map ๐Ÿฆ‹


3.2. The Tate-Lichtenbaum Pairing

now for the pairing < , > that SAKKE uses ๐Ÿ”ฎ We need to evaluate polynomials f_R that depend on points on E(F_p)[q]. Miller's algorithm [Miller] gives a way to evaluate f_R(X), where X is some element of E(F_p^2)[q], R is some element of E(F_p)[q], and f_R is some polynomial over F_p whose divisor is (q)(R) - (q)(0). Note that f_R is only defined up to scalars of F_p ๐Ÿ’œ

The version of the Tate-Lichtenbaum pairing used in this document is <R,Q> = f_R([i]Q)^c / (F_p)*. It satisfies the bilinear relation <[x]R,Q> = <R,[x]Q> = <R,Q>^x for all Q, R in E(F_p)[q], for all integers x ๐Ÿซถ Also, the domain of definition is restricted to E(F_p)[q] x E(F_p)[q] so that certain optimizations come naturally โœจ

We provide pseudocode for computing <R,Q>, with elliptic curve arithmetic written in affine coordinates ๐ŸŽ€ We use Barreto's trick [Barreto] to avoid calculating denominators. Note that this section does NOT fully describe the most efficient way to compute the pairing. It's possible to compute the pairing without any explicit reference to the extension field F_p^2, which cuts down on the number and complexity of the operations needed ๐ŸŒธ

   <CODE BEGINS>

   /*
   Copyright (c) 2012 IETF Trust and the persons identified as
   authors of the code.  All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, is permitted pursuant to, and subject to the license
   terms contained in, the Simplified BSD License set forth in
   Section 4.c of the IETF Trust's Legal Provisions Relating to
   IETF Documents (http://trustee.ietf.org/license-info).
   */

       Routine for computing the pairing <R,Q>:

         Input R, Q points on E(F_p)[q];

         Initialize variables:

           v = (F_p)*;    // An element of PF_p[q]
           C = R;         // An element of E(F_p)[q]
           c = (p+1)/q;   // An integer

         for bits of q-1, starting with the second most significant
         bit, ending with the least significant bit, do

           // gradient of line through C, C, [-2]C.
           l = 3*( C_x^2 - 1 ) / ( 2*C_y );

           //accumulate line evaluated at [i]Q into v
           v = v^2 * ( l*( Q_x + C_x ) + ( i*Q_y - C_y ) );

           C = [2]C;

           if bit is 1, then

             // gradient of line through C, R, -C-R.
             l = ( C_y - R_y )/( C_x - R_x );

             //accumulate line evaluated at [i]Q into v
             v = v * ( l*( Q_x + C_x ) + ( i*Q_y - C_y ) );

             C = C+R;

           end if;
         end for;

         t = v^c;
         return representative in F_p of t;

       End of routine;

       Routine for computing representative in F_p of elements of PF_p:

         Input t, in F_p^2, representing an element of PF_p;

         Represent t as a + i*b, with a,b in F_p;
         return b/a;

       End of routine;

   <CODE ENDS>

4. Representation of Values

this section gives the canonical representations of values, and they MUST be used so implementations can actually talk to each other ๐Ÿซถ The following representations MUST be used for input into hash functions and for transmission ๐Ÿ’Œ

   Integers           Integers MUST be represented as an octet string,
                      with bit length a multiple of 8.  To achieve this,
                      the integer is represented most significant bit
                      first, and padded with zero bits on the left until
                      an octet string of the necessary length is
                      obtained.  This is the octet string representation
                      described in Section 6 of [RFC6090].

   F_p elements       Elements of F_p MUST be represented as integers in
                      the range 0 to p-1 using the octet string
                      representation defined above.  Such octet strings
                      MUST have length L = Ceiling(lg(p)/8).

   PF_p elements      Elements of PF_p MUST be represented as an element
                      of F_p using the algorithm in Section 3.2.  They
                      are therefore represented as octet strings as
                      defined above and are L octets in length.
                      Representation of the unique element of order 2 in
                      PF_p will not be required.

   Points on E        Elliptic curve points MUST be represented in
                      uncompressed form as defined in Section 2.2 of
                      [RFC5480].  For an elliptic curve point (x,y) with
                      x and y in F_p, this representation is given by
                      0x04 || x' || y', where x' is the octet string
                      representing x, y' is the octet string
                      representing y, and || denotes concatenation.  The
                      representation is 2*L+1 octets in length.

   Encapsulated Data  The Encapsulated Data MUST be represented as an
                      elliptic curve point concatenated with an integer
                      in the range 0 to (2 ^ n) - 1.  Since the length
                      of the representation of elements of F_p is well
                      defined given p, these data can be unambiguously
                      parsed to retrieve their components.  The
                      Encapsulated Data is 2*L + n + 1 octets in length.

5. Supporting Algorithms

5.1. Hashing to an Integer Range

we use the function HashToIntegerRange( s, n, hashfn ) to hash strings into an integer range ๐ŸŒˆ Given a string (s), a hash function (hashfn), and an integer (n), this function returns a value between 0 and n - 1 ๐Ÿ’–

Input:

  • an octet string, s
  • an integer, n <= (2^hashlen)^hashlen
  • a hash function, hashfn, with output length hashlen bits

Output:

  • an integer, v, in the range 0 to n-1

Method:

  1. Let A = hashfn( s )
  2. Let h_0 = 00...00, a string of null bits of length hashlen bits
  3. Let l = Ceiling(lg(n)/hashlen)
  4. For each i in 1 to l, do:
    • a) Let h_i = hashfn(h_(i - 1))
    • b) Let v_i = hashfn(h_i || A), where || denotes concatenation
  5. Let v' = v_1 || ... || v_l
  6. Let v = v' mod n

6. The SAKKE Cryptosystem

this section describes the Sakai-Kasahara Key Encryption algorithm ๐Ÿฆ‹ It draws from the cryptosystem first described in [S-K] ๐Ÿ”ฎ

6.1. Setup

all users share a set of public parameters with a KMS ๐ŸŽ€ In most circumstances, it is expected that a system will only use a single KMS ๐Ÿ’… However, it IS possible for users provisioned by different KMSs to interoperate, as long as they use a common set of public parameters and each one possesses the necessary KMS Public Keys ๐Ÿซถ To make that interoperation work, it is anticipated that parameters will be published in application-specific standards โœจ

KMS_T chooses its KMS Master Secret, z_T. It MUST randomly select a value in the range 2 to q-1, and assigns this value to z_T. It MUST derive its KMS Public Key, Z_T, by performing the calculation Z_T = [z_T]P ๐Ÿ’œ

6.1.1. Secret Key Extraction

the KMS derives each RSK from an Identifier and its KMS Master Secret ๐Ÿ”‘ It MUST derive an RSK for each user that it provisions.

For Identifier 'a', the RSK K_(a,T) provided by KMS_T MUST be derived by KMS_T as K_(a,T) = [(a + z_T)^-1]P, where 'a' is interpreted as an integer, and the inversion is performed modulo q ๐ŸŒธ

6.1.2. User Provisioning โœจ

Okay bestie, so the KMS MUST provide its KMS Public Key to all users through an authenticated channel ๐Ÿ”. RSKs MUST be supplied to all users through a channel that provides confidentiality and mutual authentication ๐Ÿ’–. The security mechanisms for those channels are out of scope here because they're application specific, so that's a whole other vibe ๐ŸŒธ.

Once a user gets their key material, they MUST verify their RSK ๐Ÿง. For Identifier 'a', RSKs from KMS_T get checked by making sure < [a]P + Z, K_(a,T) > = g holds, where 'a' is read as an integer ๐Ÿ”ข.

6.2. Key Exchange ๐Ÿฆ‹

Here's the moment: a Sender forms Encapsulated Data, sends it to the Receiver, and the Receiver processes it ๐Ÿ’…. The result is a shared secret that can be used as keying material for securing further communications ๐Ÿ”‘. We call the Sender A with Identifier 'a' and the Receiver B with Identifier 'b', and the Identifiers get interpreted as integers in the algorithms below ๐ŸŽ€. A is provisioned by KMS_T and B is provisioned by KMS_S ๐ŸŒˆ.

6.2.1. Sender ๐Ÿ’Œ

To form Encapsulated Data for device B (provisioned by KMS_S), A needs to hold Z_S ๐Ÿงš. It's expected that KMS_T gave A Z_S along with its User Private Keys ๐Ÿ—๏ธ. The Sender MUST carry out the following steps:

  1. Select a random ephemeral integer value for the SSV in the range 0 to 2^n - 1;
  2. Compute r = HashToIntegerRange( SSV || b, q, Hash );
  3. Compute R_(b,S) = [r]([b]P + Z_S) in E(F_p);
  4. Compute the Hint, H;
    • a) Compute g^r. Note that g is an element of PF_p[q] represented by an element of F_p. So, to calculate g^r, the operation defined in Section 2.1 for calculation of A * B in PF_p[q] is to be used as part of a square and multiply (or similar) exponentiation algorithm, rather than the regular F_p operations;
    • b) Compute H := SSV XOR HashToIntegerRange( g^r, 2^n, Hash );
  5. Form the Encapsulated Data ( R_(b,S), H ), and transmit it to B ๐Ÿ“ค;
  6. Output SSV for use to derive key material for the application to be keyed โœจ.

6.2.2. Receiver ๐Ÿ“ฅ

Device B receives Encapsulated Data from device A ๐Ÿ’ซ. To process it, B needs its RSK, K_(b,S), which KMS_S provisioned ahead of time ๐Ÿ—“๏ธ. How the KMS provisions keys is application specific ๐ŸŒท. The Receiver MUST carry out the following steps to derive and verify the SSV:

  1. Parse the Encapsulated Data ( R_(b,S), H ), and extract R_(b,S) and H;
  2. Compute w := < R_(b,S), K_(b,S) >. Note that by bilinearity, w = g^r;
  3. Compute SSV = H XOR HashToIntegerRange( w, 2^n, Hash );
  4. Compute r = HashToIntegerRange( SSV || b, q, Hash );
  5. Compute TEST = [r]([b]P + Z_S) in E(F_p). If TEST does not equal R_(b,S), then B MUST NOT use the SSV to derive key material ๐Ÿšซ;
  6. Output SSV for use to derive key material for the application to be keyed ๐ŸŽ‰.

6.3. Group Communications ๐Ÿ‘ฏ

SAKKE can be used to exchange SSVs for group communications, and it's giving group chat ๐Ÿ’ฌ. To share a secret with multiple Receivers, a Sender MUST form Encapsulated Data for each of their Identifiers and transmit the right data to each Receiver ๐Ÿ“จ. Any party holding the group SSV MAY extend the group by forming Encapsulated Data for a new group member ๐Ÿซถ.

Forming multiple Encapsulated Data is still a lot of work, but the sending operation skips pairings, so adding more Receivers is way more efficient than with other IBE schemes that make the Sender compute a pairing ๐Ÿš€.

7. Security Considerations ๐Ÿ›ก๏ธ

This document describes the SAKKE cryptographic algorithm ๐Ÿ’œ. We assume that the security this algorithm provides depends entirely on the secrecy of the secret keys it uses. For an adversary to defeat it, they'd need computationally intensive cryptanalytic attacks to recover a secret key ๐Ÿ•ต๏ธ. Note that a security proof exists for SAKKE in the Random Oracle Model [SK-KEM] ๐Ÿ“œ.

When defining public parameters, guidance on parameter sizes from [SP800-57] SHOULD be followed ๐Ÿ“. The size of the F_p^2 discrete logarithm that security rests on is 2*lg(p) ๐Ÿงฎ. Table 1 shows the bits of security you get from various sizes of p ๐Ÿ‘€. If k bits of security are needed, then lg(q) SHOULD be chosen to be at least 2*k. Similarly, if k bits of security are needed, then a hash with output size at least 2*k SHOULD be chosen ๐Ÿ“.

      Bits of Security | lg(p)
      -------------------------
      80               |   512
      112              |  1024
      128              |  1536
      192              |  3840
      256              |  7680

   Table 1: Comparable Strengths, Taken from Table 2 of [SP800-57]

The KMS Master Secret is what gives security to each device the KMS provisions ๐Ÿ‘‘. It MUST NOT be revealed to any other entity ๐Ÿค. Each user's RSK protects the SAKKE communications they receive ๐Ÿ’–. This key MUST NOT be revealed to any entity other than the trusted KMS and the authorized user ๐Ÿ™…โ€โ™€๏ธ.

To make sure only an authorized device gets the RSK, it MUST be provided through a secure channel ๐Ÿ”’. The security this system offers is no greater than the security of that delivery channel, so choose wisely, bestie ๐Ÿ’€.

Note that IBE systems have different properties from other asymmetric cryptographic schemes when it comes to key recovery ๐Ÿง . The KMS (and therefore any administrator with the right privileges) can create RSKs for arbitrary Identifiers ๐Ÿ˜ณ. Procedures to monitor the creation of RSKs, such as logging administrator actions, SHOULD be defined by any functioning implementation of SAKKE ๐Ÿ“‹.

Identifiers MUST be defined unambiguously by each application of SAKKE ๐ŸŽฏ. It's not necessary to hash the data in a format for Identifiers, except when its size would be greater than that of q ๐Ÿ™ˆ. That way, any weaknesses caused by collisions in hash functions can be avoided without relying on the structure of the Identifier format โœจ. Applications of SAKKE MAY include a time/date component in their Identifier format, so that Identifiers (and hence RSKs) are only valid for a fixed period of time โฐ.

Randomness is everything here ๐ŸŽฒ. The values stipulated to be selected at random in SAKKE, as described in this document, are essential to the security SAKKE provides ๐Ÿ”. If the ephemeral value r selected by the Sender is not chosen at random, then the SSV, which provides key material for further communications, could be predictable ๐Ÿ˜ฑ. Guidance on generating random values for security can be found in [RFC4086] ๐Ÿ“š.

8. References ๐Ÿ“š

8.1. Normative References

[RFC2119]   Bradner, S., "Key words for use in RFCs to Indicate
            Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC5480]   Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk,
            "Elliptic Curve Cryptography Subject Public Key
            Information", RFC 5480, March 2009.

[RFC6090]   McGrew, D., Igoe, K., and M. Salter, "Fundamental
            Elliptic Curve Cryptography Algorithms", RFC 6090,
            February 2011.

[S-K]       Sakai, R., Ohgishi, K., and M. Kasahara, "ID based
            cryptosystem based on pairing on elliptic curves",
            Symposium on Cryptography and Information Security -
            SCIS, 2001.

[SK-KEM]    Barbosa, M., Chen, L., Cheng, Z., Chimley, M., Dent, A.,
            Farshim, P., Harrison, K., Malone-Lee, J., Smart, N., and
            F. Vercauteren, "SK-KEM: An Identity-Based KEM",
            submission for IEEE P1363.3, June 2006,
            (http://grouper.ieee.org/groups/1363/IBC/
            submissions/Barbosa-SK-KEM-2006-06.pdf).

[SP800-57]  Barker, E., Barker, W., Burr, W., Polk, W., and M. Smid,
            "Recommendation for Key Management - Part 1: General
            (Revised)", NIST Special Publication 800-57, March 2007.

8.2. Informative References

[Barreto]   Barreto, P., Kim, H., Lynn, B., and M. Scott, "Efficient
            Algorithms for Pairing-Based Cryptosystems", Advances in
            Cryptology - Crypto 2002, LNCS 2442, Springer-Verlag
            (2002), pp. 354-369.

[Miller]    Miller, V., "The Weil pairing, and its efficient
            calculation", J. Cryptology 17 (2004), 235-261.

[P1363]     IEEE P1363-2000, "Standard Specifications for Public-Key
            Cryptography", 2001.

[RFC4086]   Eastlake 3rd, D., Schiller, J., and S. Crocker,
            "Randomness Requirements for Security", BCP 106,
            RFC 4086, June 2005.

[RFC5091]   Boyen, X. and L. Martin, "Identity-Based Cryptography
            Standard (IBCS) #1: Supersingular Curve Implementations
            of the BF and BB1 Cryptosystems", RFC 5091,
            December 2007.

[RFC6509]   Groves, M., "MIKEY-SAKKE: Sakai-Kasahara Key Encryption
            in Multimedia Internet KEYing (MIKEY)", RFC 6509,
            February 2012.

Appendix A. Test Data โœจ

okay bestie, this is the good stuff ๐Ÿงš Appendix A is full of test vectors for SAKKE, using the public parameters from Appendix A of [RFC6509]. So if you're checking your implementation, these are the numbers you compare against ๐Ÿ’… Quick decoder ring: b is the Identifier of the Responder, and mask is the value that masks the SSV, defined as HashToIntegerRange( g^r, 2^n, Hash ) ๐Ÿฆ‹


// --------------------------------------------------------
// The KMS generates:

  z      = AFF429D3 5F84B110 D094803B 3595A6E2 998BC99F

  Zx     = 5958EF1B 1679BF09 9B3A030D F255AA6A
           23C1D8F1 43D4D23F 753E69BD 27A832F3
           8CB4AD53 DDEF4260 B0FE8BB4 5C4C1FF5
           10EFFE30 0367A37B 61F701D9 14AEF097
           24825FA0 707D61A6 DFF4FBD7 273566CD
           DE352A0B 04B7C16A 78309BE6 40697DE7
           47613A5F C195E8B9 F328852A 579DB8F9
           9B1D0034 479EA9C5 595F47C4 B2F54FF2

  Zy     = 1508D375 14DCF7A8 E143A605 8C09A6BF
           2C9858CA 37C25806 5AE6BF75 32BC8B5B
           63383866 E0753C5A C0E72709 F8445F2E
           6178E065 857E0EDA 10F68206 B63505ED
           87E534FB 2831FF95 7FB7DC61 9DAE6130
           1EEACC2F DA3680EA 4999258A 833CEA8F
           C67C6D19 487FB449 059F26CC 8AAB655A
           B58B7CC7 96E24E9A 39409575 4F5F8BAE

// --------------------------------------------------------
// Creating Encapsulated Data

  b      = 3230 31312D30 32007465 6C3A2B34
           34373730 30393030 31323300

  SSV    = 12345678 9ABCDEF0 12345678 9ABCDEF0
  r      = HashToIntegerRange(
           12345678 9ABCDEF0 12345678 9ABCDEF0
           32303131 2D303200 74656C3A 2B343437
           37303039 30303132 3300, q, SHA-256 )

         = 13EE3E1B 8DAC5DB1 68B1CEB3 2F0566A4
           C273693F 78BAFFA2 A2EE6A68 6E6BD90F
           8206CCAB 84E7F42E D39BD4FB 131012EC
           CA2ECD21 19414560 C17CAB46 B956A80F
           58A3302E B3E2C9A2 28FBA7ED 34D8ACA2
           392DA1FF B0B17B23 20AE09AA EDFD0235
           F6FE0EB6 5337A63F 9CC97728 B8E5AD04
           60FADE14 4369AA5B 21662132 47712096

  Rbx    = 44E8AD44 AB8592A6 A5A3DDCA 5CF896C7
           18043606 A01D650D EF37A01F 37C228C3
           32FC3173 54E2C274 D4DAF8AD 001054C7
           6CE57971 C6F4486D 57230432 61C506EB
           F5BE438F 53DE04F0 67C776E0 DD3B71A6
           29013328 3725A532 F21AF145 126DC1D7
           77ECC27B E50835BD 28098B8A 73D9F801
           D893793A 41FF5C49 B87E79F2 BE4D56CE

  Rby    = 557E134A D85BB1D4 B9CE4F8B E4B08A12
           BABF55B1 D6F1D7A6 38019EA2 8E15AB1C
           9F76375F DD1210D4 F4351B9A 009486B7
           F3ED46C9 65DED2D8 0DADE4F3 8C6721D5
           2C3AD103 A10EBD29 59248B4E F006836B
           F097448E 6107C9ED EE9FB704 823DF199
           F832C905 AE45F8A2 47A072D8 EF729EAB
           C5E27574 B07739B3 4BE74A53 2F747B86

  g^r    = 7D2A8438 E6291C64 9B6579EB 3B79EAE9
           48B1DE9E 5F7D1F40 70A08F8D B6B3C515
           6F2201AF FBB5CB9D 82AA3EC0 D0398B89
           ABC78A13 A760C0BF 3F77E63D 0DF3F1A3
           41A41B88 11DF197F D6CD0F00 3125606F
           4F109F40 0F7292A1 0D255E3C 0EBCCB42
           53FB182C 68F09CF6 CD9C4A53 DA6C74AD
           007AF36B 8BCA979D 5895E282 F483FCD6

  mask   = HashToIntegerRange(
           7D2A8438 E6291C64 9B6579EB 3B79EAE9
           48B1DE9E 5F7D1F40 70A08F8D B6B3C515
           6F2201AF FBB5CB9D 82AA3EC0 D0398B89
           ABC78A13 A760C0BF 3F77E63D 0DF3F1A3
           41A41B88 11DF197F D6CD0F00 3125606F
           4F109F40 0F7292A1 0D255E3C 0EBCCB42
           53FB182C 68F09CF6 CD9C4A53 DA6C74AD
           007AF36B 8BCA979D 5895E282 F483FCD6, 2^128, SHA-256 )

         = 9BD4EA1E 801D37E6 2AD2FAB0 D4F5BBF7

  H      = 89E0BC66 1AA1E916 38E6ACC8 4E496507

// --------------------------------------------------------
// Receiver processing

// Device receives Kb from the KMS

  Kbx    = 93AF67E5 007BA6E6 A80DA793 DA300FA4
           B52D0A74 E25E6E7B 2B3D6EE9 D18A9B5C
           5023597B D82D8062 D3401956 3BA1D25C
           0DC56B7B 979D74AA 50F29FBF 11CC2C93
           F5DFCA61 5E609279 F6175CEA DB00B58C
           6BEE1E7A 2A47C4F0 C456F052 59A6FA94
           A634A40D AE1DF593 D4FECF68 8D5FC678
           BE7EFC6D F3D68353 25B83B2C 6E69036B

  Kby    = 155F0A27 241094B0 4BFB0BDF AC6C670A
           65C325D3 9A069F03 659D44CA 27D3BE8D
           F311172B 55416018 1CBE94A2 A783320C
           ED590BC4 2644702C F371271E 496BF20F
           588B78A1 BC01ECBB 6559934B DD2FB65D
           2884318A 33D1A42A DF5E33CC 5800280B
           28356497 F87135BA B9612A17 26042440
           9AC15FEE 996B744C 33215123 5DECB0F5

// Device processes Encapsulated Data

  w      = 7D2A8438 E6291C64 9B6579EB 3B79EAE9
           48B1DE9E 5F7D1F40 70A08F8D B6B3C515
           6F2201AF FBB5CB9D 82AA3EC0 D0398B89
           ABC78A13 A760C0BF 3F77E63D 0DF3F1A3
           41A41B88 11DF197F D6CD0F00 3125606F
           4F109F40 0F7292A1 0D255E3C 0EBCCB42
           53FB182C 68F09CF6 CD9C4A53 DA6C74AD
           007AF36B 8BCA979D 5895E282 F483FCD6

  SSV    = 12345678 9ABCDEF0 12345678 9ABCDEF0

  r      = 13EE3E1B 8DAC5DB1 68B1CEB3 2F0566A4
           C273693F 78BAFFA2 A2EE6A68 6E6BD90F
           8206CCAB 84E7F42E D39BD4FB 131012EC
           CA2ECD21 19414560 C17CAB46 B956A80F
           58A3302E B3E2C9A2 28FBA7ED 34D8ACA2
           392DA1FF B0B17B23 20AE09AA EDFD0235
           F6FE0EB6 5337A63F 9CC97728 B8E5AD04
           60FADE14 4369AA5B 21662132 47712096

  TESTx  = 44E8AD44 AB8592A6 A5A3DDCA 5CF896C7
           18043606 A01D650D EF37A01F 37C228C3
           32FC3173 54E2C274 D4DAF8AD 001054C7
           6CE57971 C6F4486D 57230432 61C506EB
           F5BE438F 53DE04F0 67C776E0 DD3B71A6
           29013328 3725A532 F21AF145 126DC1D7
           77ECC27B E50835BD 28098B8A 73D9F801
           D893793A 41FF5C49 B87E79F2 BE4D56CE

  TESTy  = 557E134A D85BB1D4 B9CE4F8B E4B08A12
           BABF55B1 D6F1D7A6 38019EA2 8E15AB1C
           9F76375F DD1210D4 F4351B9A 009486B7
           F3ED46C9 65DED2D8 0DADE4F3 8C6721D5
           2C3AD103 A10EBD29 59248B4E F006836B
           F097448E 6107C9ED EE9FB704 823DF199
           F832C905 AE45F8A2 47A072D8 EF729EAB
           C5E27574 B07739B3 4BE74A53 2F747B86

  TEST == Rb

// --------------------------------------------------------
// HashToIntegerRange( M, q, SHA-256 ) example

  M      = 12345678 9ABCDEF0 12345678 9ABCDEF0
           32303131 2D303200 74656C3A 2B343437
           37303039 30303132 3300

  A      = E04D4EF6 9DF86893 22B39AE3 80284617
           4A93BEDB 1E3D2A2C 5F2C7EA0 05513EBA

  h0     = 00000000 00000000 00000000 00000000
           00000000 00000000 00000000 00000000

  h1     = 66687AAD F862BD77 6C8FC18B 8E9F8E20
           08971485 6EE233B3 902A591D 0D5F2925

  h2     = 2B32DB6C 2C0A6235 FB1397E8 225EA85E
           0F0E6E8C 7B126D00 16CCBDE0 E667151E

  h3     = 12771355 E46CD47C 71ED1721 FD5319B3
           83CCA3A1 F9FCE3AA 1C8CD3BD 37AF20D7

  h4     = FE15C0D3 EBE314FA D720A08B 839A004C
           2E6386F5 AECC19EC 74807D19 20CB6AEB

  v1     = FA2656CA 1D2DBD79 015AE918 773DFEDC
           24957C91 E3C9C335 40D6BF6D 7C3C0055

  v2     = F016CD67 59620AD7 87669E3A DD887DF6
           25895A91 0CEE1486 91A06735 B2F0A248

  v3     = AC45C6F9 7F83BCE0 A2BBD0A1 4CF4D7F4
           CB3590FB FAF93AE7 1C64E426 185710B5

  v4     = E65D50BD 551A54EF 981F535E 072DE98D
           2223ACAD 4621E026 3B0A61EA C56DB078

 v mod q = 13EE3E1B 8DAC5DB1 68B1CEB3 2F0566A4
           C273693F 78BAFFA2 A2EE6A68 6E6BD90F
           8206CCAB 84E7F42E D39BD4FB 131012EC
           CA2ECD21 19414560 C17CAB46 B956A80F
           58A3302E B3E2C9A2 28FBA7ED 34D8ACA2
           392DA1FF B0B17B23 20AE09AA EDFD0235
           F6FE0EB6 5337A63F 9CC97728 B8E5AD04
           60FADE14 4369AA5B 21662132 47712096

Author's Address ๐ŸŽ€

the author, Michael Groves at CESG, contact details below ๐ŸŒธ

Michael Groves
CESG
Hubble Road
Cheltenham
GL51 8HJ
UK

EMail: Michael.Groves@cesg.gsi.gov.uk
๐Ÿ“ฆ where this page comes from