mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 19:23:34 +01:00
chore: modernize CI and update Go toolchain
- Bump Go from 1.19 to 1.26 and update all dependencies - Rewrite CI workflow with matrix strategy (Linux, macOS, Windows) - Update GitHub Actions to current versions (checkout@v4, setup-go@v5) - Update CodeQL actions from v1 to v3 - Fix cross-platform bug in mock/path.go (path.Join -> filepath.Join) - Clean up dependabot config (weekly schedule, remove stale ignore) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
3
vendor/github.com/pjbgf/sha1cd/ubc/doc.go
generated
vendored
3
vendor/github.com/pjbgf/sha1cd/ubc/doc.go
generated
vendored
@@ -1,3 +0,0 @@
|
||||
// ubc package provides ways for SHA1 blocks to be checked for
|
||||
// Unavoidable Bit Conditions that arise from crypto analysis attacks.
|
||||
package ubc
|
||||
17
vendor/github.com/pjbgf/sha1cd/ubc/check.go → vendor/github.com/pjbgf/sha1cd/ubc/ubc.go
generated
vendored
17
vendor/github.com/pjbgf/sha1cd/ubc/check.go → vendor/github.com/pjbgf/sha1cd/ubc/ubc.go
generated
vendored
@@ -1,8 +1,10 @@
|
||||
// ubc package provides ways for SHA1 blocks to be checked for
|
||||
// Unavoidable Bit Conditions that arise from crypto analysis attacks.
|
||||
package ubc
|
||||
|
||||
// Based on the C implementation from Marc Stevens and Dan Shumow.
|
||||
// https://github.com/cr-marcstevens/sha1collisiondetection
|
||||
|
||||
package ubc
|
||||
|
||||
type DvInfo struct {
|
||||
// DvType, DvK and DvB define the DV: I(K,B) or II(K,B) (see the paper).
|
||||
// https://marc-stevens.nl/research/papers/C13-S.pdf
|
||||
@@ -21,10 +23,12 @@ type DvInfo struct {
|
||||
Dm [80]uint32
|
||||
}
|
||||
|
||||
// CalculateDvMask takes as input an expanded message block and verifies the unavoidable bitconditions
|
||||
// for all listed DVs. It returns a dvmask where each bit belonging to a DV is set if all
|
||||
// unavoidable bitconditions for that DV have been met.
|
||||
// Thus, one needs to do the recompression check for each DV that has its bit set.
|
||||
// CalculateDvMask takes as input an expanded message block and
|
||||
// verifies the unavoidable bitconditions for all listed DVs. It returns
|
||||
// a dvmask where each bit belonging to a DV is set if all unavoidable
|
||||
// bitconditions for that DV have been met.
|
||||
//
|
||||
//go:nosplit
|
||||
func CalculateDvMask(W [80]uint32) uint32 {
|
||||
mask := uint32(0xFFFFFFFF)
|
||||
mask &= (((((W[44] ^ W[45]) >> 29) & 1) - 1) | ^(DV_I_48_0_bit | DV_I_51_0_bit | DV_I_52_0_bit | DV_II_45_0_bit | DV_II_46_0_bit | DV_II_50_0_bit | DV_II_51_0_bit))
|
||||
@@ -363,6 +367,7 @@ func not(x uint32) uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func SHA1_dvs() []DvInfo {
|
||||
return sha1_dvs
|
||||
}
|
||||
Reference in New Issue
Block a user