You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to clarify the usage of the string concatenation operator || when used with the master secret derivation functions.
Based on the short explanation found in the notation table, it makes sense to use that operator whenever we are doing the big-endian binary string concatenations.
However, for the PBKDF2 derivation functions, I noticed that this operator is also being used, despite the following paragraph that implies that string concatenation is not used, but instead a specific encoding must be followed in order to create the salt for the function.
Each of the master secret derivation functions uses the key derivation function PBKDF2. Whenever the random identifier value id or the threshold T is an input to PBKDF2, it is encoded in the following manner. The random identifier value is split into three 10-bit integers each encoded as two bytes in little-endian byte order. The threshold is encoded as one byte.
The meaning of the expression "slip0039" || id || T is the following. The random identifier value is encoded into two bytes and the threshold is encoded into one byte, according to the quoted paragraph. The resulting value is the concatenation of the byte string b"slip0039" and these three bytes.
Assume id = 725425835, T = 3, then "slip0039" || id || T = 0x736c697030303339b3024703ab0203.
Thank you for that example, that was helpful. I guess I just find it confusing that under Notation, || is called the, "string concatenation operator", when in this case it is doing byte or bytes concatenation.
I wanted to clarify the usage of the string concatenation operator
||
when used with the master secret derivation functions.Based on the short explanation found in the notation table, it makes sense to use that operator whenever we are doing the big-endian binary string concatenations.
However, for the PBKDF2 derivation functions, I noticed that this operator is also being used, despite the following paragraph that implies that string concatenation is not used, but instead a specific encoding must be followed in order to create the salt for the function.
Example confusing usage:
The text was updated successfully, but these errors were encountered: