Revert "Implement ARGON2 hash (#1165)" due to an unwanted added binary.

This reverts commit bf38782790.
This commit is contained in:
timvisee 2017-06-01 13:06:15 +02:00
parent 160a0877b3
commit cae29a2f99
5 changed files with 2 additions and 71 deletions

View File

@ -1,5 +1,5 @@
<!-- AUTO-GENERATED FILE! Do not edit this directly -->
<!-- File auto-generated on Sat Apr 29 18:27:40 CEST 2017. See docs/hashmethods/hash_algorithms.tpl.md -->
<!-- File auto-generated on Sat Mar 25 00:15:27 CET 2017. See docs/hashmethods/hash_algorithms.tpl.md -->
## Hash Algorithms
AuthMe supports the following hash algorithms for storing your passwords safely.
@ -7,7 +7,6 @@ AuthMe supports the following hash algorithms for storing your passwords safely.
Algorithm | Recommendation | Hash length | ASCII | | Salt type | Length | Separate?
--------- | -------------- | ----------- | ----- | --- | --------- | ------ | ---------
ARGON2 | Recommended | 96 | | | Text | 16 |
BCRYPT | Recommended | 60 | | | Text | |
BCRYPT2Y | Recommended | 60 | | | Text | 22 |
CRAZYCRYPT1 | Do not use | 128 | | | Username | |
@ -83,4 +82,4 @@ or bad.
---
This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Apr 29 18:27:40 CEST 2017
This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Mar 25 00:15:27 CET 2017

15
pom.xml
View File

@ -264,10 +264,6 @@
<pattern>de.rtner</pattern>
<shadedPattern>fr.xephi.authme.libs.de.rtner</shadedPattern>
</relocation>
<relocation>
<pattern>de.mkammerer</pattern>
<shadedPattern>fr.xephi.authme.libs.de.mkammerer</shadedPattern>
</relocation>
<relocation>
<pattern>javax.inject</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.inject</shadedPattern>
@ -323,10 +319,6 @@
<pattern>de.rtner</pattern>
<shadedPattern>fr.xephi.authme.libs.de.rtner</shadedPattern>
</relocation>
<relocation>
<pattern>de.mkammerer</pattern>
<shadedPattern>fr.xephi.authme.libs.de.mkammerer</shadedPattern>
</relocation>
<relocation>
<pattern>javax.inject</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.inject</shadedPattern>
@ -530,13 +522,6 @@
<version>1.1.2</version>
</dependency>
<!-- Argon2 implementation -->
<dependency>
<groupId>de.mkammerer</groupId>
<artifactId>argon2-jvm</artifactId>
<version>2.2</version>
</dependency>
<!-- Spigot API, http://www.spigotmc.org/ or http://bukkit.org/ -->
<!-- Moved in profiles! -->

View File

@ -7,7 +7,6 @@ import fr.xephi.authme.security.crypts.EncryptionMethod;
*/
public enum HashAlgorithm {
ARGON2(fr.xephi.authme.security.crypts.Argon2.class),
BCRYPT(fr.xephi.authme.security.crypts.BCrypt.class),
BCRYPT2Y(fr.xephi.authme.security.crypts.BCrypt2y.class),
CRAZYCRYPT1(fr.xephi.authme.security.crypts.CrazyCrypt1.class),

View File

@ -1,31 +0,0 @@
package fr.xephi.authme.security.crypts;
import de.mkammerer.argon2.Argon2Constants;
import de.mkammerer.argon2.Argon2Factory;
import fr.xephi.authme.security.crypts.description.HasSalt;
import fr.xephi.authme.security.crypts.description.Recommendation;
import fr.xephi.authme.security.crypts.description.SaltType;
import fr.xephi.authme.security.crypts.description.Usage;
@Recommendation(Usage.RECOMMENDED)
@HasSalt(value = SaltType.TEXT, length = Argon2Constants.DEFAULT_SALT_LENGTH)
// Note: Argon2 is actually a salted algorithm but salt generation is handled internally
// and isn't exposed to the outside, so we treat it as an unsalted implementation
public class Argon2 extends UnsaltedMethod {
private de.mkammerer.argon2.Argon2 argon2;
public Argon2() {
argon2 = Argon2Factory.create();
}
@Override
public String computeHash(String password) {
return argon2.hash(2, 65536, 1, password);
}
@Override
public boolean comparePassword(String password, HashedPassword hashedPassword, String name) {
return argon2.verify(hashedPassword.getHash(), password);
}
}

View File

@ -1,21 +0,0 @@
package fr.xephi.authme.security.crypts;
/**
* Test for {@link Argon2}.
*/
public class Argon2Test extends AbstractEncryptionMethodTest {
public Argon2Test() {
super(new Argon2(),
"$argon2i$v=19$m=65536,t=2,p=1$dOP8NiXsPTcMgzI4Z8Rbew$ShdowtoTEWTL5UTFz1UgQOigb9JOlm4ZxWPA6WbIeUw", // password
"$argon2i$v=19$m=65536,t=2,p=1$amZHbPfgc5peKd/4w1AI1g$Q2PUiOVw47TACijP57U0xf7QfiZ00HV4eFzMDA6yKRE", // PassWord1
"$argon2i$v=19$m=65536,t=2,p=1$58v7dWNn9/bpD00QLzSebw$7cMC7p0qceE3Mgf2yQp4X7c+UkO9oyJwQ7S6XTBubNs", // &^%te$t?Pw@_
"$argon2i$v=19$m=65536,t=2,p=1$93OSU71DgBOzpmhti7+6rQ$sSSI6QQQdoG9DlGwLjYz576kTek89nwr9CyNpy6bsL0"); // âË_3(íù*
}
@Override
protected boolean testHashEqualityForSameSalt() {
// Argon2 has a salt but it is handled internally
return false;
}
}