otplib icon indicating copy to clipboard operation
otplib copied to clipboard

where in the RFC is secret's padding

Open pyramation opened this issue 4 years ago • 0 comments

Hello. Thanks for this library!

https://github.com/yeojz/otplib/blob/dab816b2faf6657c2e2d7e8e91391511c743a07c/packages/otplib-core/src/totp.ts#L92-L109

Referencing these lines, it looks like you're copying the secret's buffer data until it fills the required size. Maybe I'm missing something from the totp or hotp RFC where I can read some documentation where this particular part of the code is based on? I'm learning TOTP and this library and wanted to understand where this particular part of the algorithm is described.

https://tools.ietf.org/html/rfc6238 here is doesn't seem they pad the secret. Is the padding something that happened in the industry, but not necessarily the standards?

Thanks in advance!

pyramation avatar Nov 14 '20 09:11 pyramation