mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-09 22:50:05 +00:00
Knut Ahlers
a1df72edc5
commitf0db1ff1f8
Author: Knut Ahlers <knut@ahlers.me> Date: Sun Dec 24 12:19:56 2017 +0100 Mark option as deprecated Signed-off-by: Knut Ahlers <knut@ahlers.me> commit9891df2a16
Author: Knut Ahlers <knut@ahlers.me> Date: Sun Dec 24 12:11:56 2017 +0100 Fix: Typo Signed-off-by: Knut Ahlers <knut@ahlers.me> commit836006de64
Author: Knut Ahlers <knut@ahlers.me> Date: Sun Dec 24 12:04:20 2017 +0100 Add new dependencies Signed-off-by: Knut Ahlers <knut@ahlers.me> commitd64fee60c8
Author: Knut Ahlers <knut@ahlers.me> Date: Sun Dec 24 11:55:52 2017 +0100 Replace insecure password hashing Prior this commit passwords were hashed with a static salt and using the SHA1 hashing function. This could lead to passwords being attackable in case someone gets access to the raw data stored inside the database. This commit introduces password hashing using bcrypt hashing function which addresses this issue. Old passwords are not automatically re-hashed as they are unknown. Replacing the old password scheme is not that easy and needs #10 to be solved. Therefore the old hashing scheme is kept for compatibility reason. Signed-off-by: Knut Ahlers <knut@ahlers.me> Signed-off-by: Knut Ahlers <knut@ahlers.me> closes #14 closes #15
73 lines
1.2 KiB
ArmAsm
73 lines
1.2 KiB
ArmAsm
// Copyright 2012 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// This code was translated into a form compatible with 6a from the public
|
|
// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
|
|
|
|
// +build amd64,!gccgo,!appengine
|
|
|
|
#include "const_amd64.h"
|
|
|
|
// func freeze(inout *[5]uint64)
|
|
TEXT ·freeze(SB),7,$0-8
|
|
MOVQ inout+0(FP), DI
|
|
|
|
MOVQ 0(DI),SI
|
|
MOVQ 8(DI),DX
|
|
MOVQ 16(DI),CX
|
|
MOVQ 24(DI),R8
|
|
MOVQ 32(DI),R9
|
|
MOVQ $REDMASK51,AX
|
|
MOVQ AX,R10
|
|
SUBQ $18,R10
|
|
MOVQ $3,R11
|
|
REDUCELOOP:
|
|
MOVQ SI,R12
|
|
SHRQ $51,R12
|
|
ANDQ AX,SI
|
|
ADDQ R12,DX
|
|
MOVQ DX,R12
|
|
SHRQ $51,R12
|
|
ANDQ AX,DX
|
|
ADDQ R12,CX
|
|
MOVQ CX,R12
|
|
SHRQ $51,R12
|
|
ANDQ AX,CX
|
|
ADDQ R12,R8
|
|
MOVQ R8,R12
|
|
SHRQ $51,R12
|
|
ANDQ AX,R8
|
|
ADDQ R12,R9
|
|
MOVQ R9,R12
|
|
SHRQ $51,R12
|
|
ANDQ AX,R9
|
|
IMUL3Q $19,R12,R12
|
|
ADDQ R12,SI
|
|
SUBQ $1,R11
|
|
JA REDUCELOOP
|
|
MOVQ $1,R12
|
|
CMPQ R10,SI
|
|
CMOVQLT R11,R12
|
|
CMPQ AX,DX
|
|
CMOVQNE R11,R12
|
|
CMPQ AX,CX
|
|
CMOVQNE R11,R12
|
|
CMPQ AX,R8
|
|
CMOVQNE R11,R12
|
|
CMPQ AX,R9
|
|
CMOVQNE R11,R12
|
|
NEGQ R12
|
|
ANDQ R12,AX
|
|
ANDQ R12,R10
|
|
SUBQ R10,SI
|
|
SUBQ AX,DX
|
|
SUBQ AX,CX
|
|
SUBQ AX,R8
|
|
SUBQ AX,R9
|
|
MOVQ SI,0(DI)
|
|
MOVQ DX,8(DI)
|
|
MOVQ CX,16(DI)
|
|
MOVQ R8,24(DI)
|
|
MOVQ R9,32(DI)
|
|
RET
|