Incremented Version Count. Basically the issue was, that the standard
for HOTP only specified the use of SHA-1 as an algorithm for the OTP and HOTP added the use of SHA-256 and SHA-512, which had a longer and different output length. MD5 on the other hand only uses 128 bytes of output, which could sometimes cause an IndexOutOfBounds Exception, when trying to read the last 4 bytes starting at byte 15. (Byte 16, 17 and 18 are outside the array bounds). Since the standard does not specify how to implement the algorithm using MD5, the best solution was to change the size of the array, instead of looping while fetching the values at the indices. This is because the specification is very clear about how to fetch the values: The Indices shall not loop, but rather just increment. Since this is not standard conforming, we can only hope, that this is compatible with other implementations, that feature MD5.
This commit is contained in:
parent
ce1c2322f0
commit
1896eef707
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.cringe_studios</groupId>
|
||||
<artifactId>CringeAuthenticatorLibrary</artifactId>
|
||||
<version>1.5</version>
|
||||
<version>1.6</version>
|
||||
<name>CringeAuthenticatorLibrary</name>
|
||||
<description>The Library of the Cringe Authenticator</description>
|
||||
<build>
|
||||
|
Loading…
Reference in New Issue
Block a user