Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140512164847.GA2720@wolfman.devio.us>
Date: Mon, 12 May 2014 12:48:47 -0400
From: Kent Fritz <kfritz@...fman.devio.us>
To: john-users@...ts.openwall.com
Subject: $2b$ bcrypt support

http://marc.info/?l=openbsd-misc&m=139320023202696

Naive patch below.  Is this all that's required, or am I missing something?

Thanks!

Kent.


diff --git a/src/BF_fmt.c b/src/BF_fmt.c
index 4cdf17e..1a1c466 100644
--- a/src/BF_fmt.c
+++ b/src/BF_fmt.c
@@ -120,6 +120,7 @@ static int valid(char *ciphertext, struct fmt_main *self)
 	char *pos;
 
 	if (strncmp(ciphertext, "$2a$", 4) &&
+	    strncmp(ciphertext, "$2b$", 4) &&
 	    strncmp(ciphertext, "$2x$", 4) &&
 	    strncmp(ciphertext, "$2y$", 4))
 		return 0;
diff --git a/src/c3_fmt.c b/src/c3_fmt.c
index 915e8e9..013a8ce 100644
--- a/src/c3_fmt.c
+++ b/src/c3_fmt.c
@@ -312,6 +312,7 @@ static void *salt(char *ciphertext)
 		else
 		if (length == 60 &&
 		    (!strncmp(ciphertext, "$2a$", 4) ||
+		    !strncmp(ciphertext, "$2b$", 4) ||
 		    !strncmp(ciphertext, "$2x$", 4) ||
 		    !strncmp(ciphertext, "$2y$", 4)))
 			cut = 29;

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.