RFC 4401
A Pseudo-Random Function (PRF) API Extension for the Generic Security Service Application Program Interface (GSS-API)
RFC 4401: A Pseudo-Random Function (PRF) API Extension for the Generic Security Service Application Program Interface (GSS-API) π
okay bestie, this one is all about getting keying material out of a GSS-API security context πβ¨ It's by N. Williams from Sun Microsystems, it's on the Standards Track, and it's dated February 2006 π It doesn't obsolete or update anything (no obsoletes or updates are listed in the header) π«Ά
Status of This Memo π
This document is an Internet standards track protocol spec for the Internet community, and it's asking for discussion and suggestions for improvements π¬ If you want to know where this stands in the official standardization state, check the current edition of the "Internet Official Protocol Standards" (STD 1) π Distribution of this memo is unlimited, so share away πΈ
Copyright Notice Β©οΈ
Copyright (C) The Internet Society (2006). π
Abstract π¦
This doc defines a Pseudo-Random Function (PRF) extension to the GSS-API. Its whole job is keying application protocols once you already have an established GSS-API security context π The main use case is for secure session layers that don't use, or can't use, the GSS-API per-message message integrity check (MIC) and wrap tokens for session protection π§
Table of Contents π
1. Introduction ....................................................2
1.1. Conventions Used in This Document ..........................2
2. GSS_Pseudo_random() .............................................2
2.1. C-Bindings .................................................5
3. IANA Considerations .............................................5
4. Security Considerations .........................................5
5. References ......................................................7
5.1. Normative References .......................................7
5.2. Informative References .....................................7
1. Introduction β¨
okay so the situation is this: apps need to key their own crypto protocols using an established GSS-API context π They can use the GSS-API [RFC2743] for authentication, but not for transport security (for whatever reasons) π€·ββοΈ And since the GSS-API doesn't give you a way to pull keying material out of established contexts, these apps basically can't make effective use of it π
So to fix that, this doc defines a pseudo-random function (PRF) extension to the GSS-API π
Now, this spec describes an abstract API as an extension to GSS-API version 2, update 1, and it also gives the C-language bindings for it. But it does NOT count as a revision of GSS-API. That means it doesn't deal with how portable apps detect that this extension is supported and get access to it. That bit gets pushed to an expected, comprehensive update of the GSS-API π«
1.1. Conventions Used in This Document π
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] π
2. GSS_Pseudo_random() π
Here's the main function, GSS_Pseudo_random(), and it's giving very specific vibes π
Here are its inputs:
context CONTEXT handle,
prf_key INTEGER,
prf_in OCTET STRING,
desired_output_len INTEGER
And here are its outputs:
major_status INTEGER,
minor_status INTEGER,
prf_out OCTET STRING
These are the major_status codes it can return:
GSS_S_COMPLETEindicates no error. βGSS_S_NO_CONTEXTindicates that a null context has been provided as input. π«₯GSS_S_CONTEXT_EXPIREDindicates that an expired context has been provided as input. βGSS_S_UNAVAILABLEindicates that the mechanism lacks support for this function or, if the security context is not fully established, that the context is not ready to compute the PRF with the givenprf_key, or that the givenprf_keyis not available. π«GSS_S_FAILUREindicates general failure, possibly due to the given input data being too large or of zero length, or due to thedesired_output_lenbeing zero. The minor status code may give more info. π
Here's what the function actually does. It applies the established context's mechanism's keyed pseudo-random function (PRF) to the input data (prf_in). The key material comes from the given security context and gets picked out by prf_key. Then it outputs the resulting octet string (prf_out) with desired_output_len length π§
The minimum input data length is one octet. π«Ά
Mechanisms MUST be able to consume all the provided prf_in input data that is 2^14 or fewer octets. π₯
If a mechanism can't consume as much input data as the caller provided, then GSS_Pseudo_random() MUST return GSS_S_FAILURE. π
The minimum desired_output_len is one. π
Mechanisms MUST be able to output at least up to 2^14 octets. π
If the implementation can't produce the desired output because it's out of resources, then it MUST return GSS_S_FAILURE and MUST set a suitable minor status code. π
The prf_key can take on the following values: GSS_C_PRF_KEY_FULL, GSS_C_PRF_KEY_PARTIAL, or mechanism-specific values, if any. This parameter is meant to tell apart the best cryptographic keys, which might only be available after full security context establishment, from keys that might be available before full establishment β¨ For some mechanisms, or contexts, those two prf_key values MAY refer to the same cryptographic keys. For mechanisms like the Kerberos V GSS-API mechanism [RFC1964], where one peer may assert a key that's considered better than the others, they MAY be different keys. π
GSS_C_PRF_KEY_PARTIAL corresponds to a key that would have been used while the security context was partially established, even if it's fully established by the time GSS_Pseudo_random() actually gets called. Mechanism-specific prf_key values are for any other keys that might be available π§©
GSS_C_PRF_KEY_FULL corresponds to the best key available for fully-established security contexts. π
GSS_Pseudo_random() has these properties:
- Its output string MUST be a pseudo-random function [GGM1] [GGM2] of the input, keyed with key material from the given security context. The chances of getting the same output from different input parameters should be exponentially small. π²
- When it's successfully applied to the same inputs by an initiator and acceptor using the same security context, it MUST produce the same results for both the initiator and the acceptor. This holds even if it's called multiple times, as long as the security context hasn't expired. π€
- Upon full establishment of a security context, all cryptographic keys and/or negotiations used for computing the PRF with any
prf_keyMUST be authenticated (mutually, if mutual authentication is in effect for the given security context). π - The outputs of the mechanism's
GSS_Pseudo_random()(for different inputs) and its per-message tokens for the given security context MUST be "cryptographically separate". In other words, it must not be feasible to recover key material for one mechanism operation, or transform its tokens and PRF outputs from one to the other, given only said tokens and PRF outputs. (This is a fancy way of saying that key derivation and strong cryptographic operations and constructions must be used.) π§ - As implied by the above requirement, it MUST NOT be possible to access any raw keys of a security context through
GSS_Pseudo_random(), no matter what inputs are given. π«π
2.1. C-Bindings π
Here are the C bindings for the function:
#define GSS_C_PRF_KEY_FULL 0
#define GSS_C_PRF_KEY_PARTIAL 1
OM_uint32 gss_pseudo_random(
OM_uint32 *minor_status,
gss_ctx_id_t context,
int prf_key,
const gss_buffer_t prf_in,
ssize_t desired_output_len,
gss_buffer_t prf_out
);
The C bindings also add these extra major status codes:
GSS_S_CALL_INACCESSIBLE_READGSS_S_CALL_INACCESSIBLE_WRITE
For more on those, see [RFC2744] πΈ
Author's Address π
Okay bestie, this is where you find the author! π¦ Nicolas Williams was at Sun Microsystems when this was written, and here's how to reach him:
Nicolas Williams
Sun Microsystems
5300 Riata Trace Ct
Austin, TX 78727
US
EMail: Nicolas.Williams@sun.com
Full Copyright Statement π
So, legally speaking: Copyright (C) The Internet Society (2006). β¨ The document is subject to the rights, licenses and restrictions in BCP 78, and except as set forth there, the authors keep all their rights. Nothing new, just the official receipts π§Ύ
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Translation: it's given to you as-is, and nobody involved is promising it's perfect or non-infringing or fit for any specific job. Plan accordingly π
Intellectual Property π₯
The IETF doesn't take a side on whether anyone's rights cover the tech in this document, how valid or broad those rights are, or whether a license is even available. It also doesn't claim it went looking for those rights itself. If you want the rules around RFC rights, check out BCP 78 and BCP 79 π§
Copies of IPR disclosures sent to the IETF Secretariat are a thing, and so are any assurances of licenses that get offered. You can also find the results of anyone trying to get a general license or permission for implementers or users of this spec. All of that lives in the IETF on-line IPR repository at http://www.ietf.org/ipr ποΈ
The IETF also invites anyone who knows about copyrights, patents, patent applications, or other proprietary rights that might cover tech needed to implement this standard to speak up. Send that info to ietf-ipr@ietf.org π¬ Be the hero who speaks up π¦ΈββοΈ
Acknowledgement π
Funding for the RFC Editor function comes from the IETF Administrative Support Activity (IASA). Thank you, IASA, you're the real MVP π«Άπ
π¦ where this page comes from
- ietf: rfc4401 2006-02
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms