git/sha1collisiondetection/lib/ubc_check.c

/***
* Copyright 2017 Marc Stevens <[email protected]>, Dan Shumow <[email protected]>
* Distributed under the MIT Software License.
* See accompanying file LICENSE.txt or copy at
* https://opensource.org/licenses/MIT
***/

/*
// this file was generated by the 'parse_bitrel' program in the tools section
// using the data files from directory 'tools/data/3565'
//
// sha1_dvs contains a list of SHA-1 Disturbance Vectors (DV) to check
// dvType, dvK and dvB define the DV: I(K,B) or II(K,B) (see the paper)
// dm[80] is the expanded message block XOR-difference defined by the DV
// testt is the step to do the recompression from for collision detection
// maski and maskb define the bit to check for each DV in the dvmask returned by ubc_check
//
// ubc_check 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
//
// ubc_check is programmatically generated and the unavoidable bitconditions have been hardcoded
// a directly verifiable version named ubc_check_verify can be found in ubc_check_verify.c
// ubc_check has been verified against ubc_check_verify using the 'ubc_check_test' program in the tools section
*/

#ifndef SHA1DC_NO_STANDARD_INCLUDES
#include <stdint.h>
#endif
#ifdef SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
#include SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
#endif
#include "ubc_check.h"

static const uint32_t DV_I_43_0_bit 	=;
static const uint32_t DV_I_44_0_bit 	=;
static const uint32_t DV_I_45_0_bit 	=;
static const uint32_t DV_I_46_0_bit 	=;
static const uint32_t DV_I_46_2_bit 	=;
static const uint32_t DV_I_47_0_bit 	=;
static const uint32_t DV_I_47_2_bit 	=;
static const uint32_t DV_I_48_0_bit 	=;
static const uint32_t DV_I_48_2_bit 	=;
static const uint32_t DV_I_49_0_bit 	=;
static const uint32_t DV_I_49_2_bit 	=;
static const uint32_t DV_I_50_0_bit 	=;
static const uint32_t DV_I_50_2_bit 	=;
static const uint32_t DV_I_51_0_bit 	=;
static const uint32_t DV_I_51_2_bit 	=;
static const uint32_t DV_I_52_0_bit 	=;
static const uint32_t DV_II_45_0_bit 	=;
static const uint32_t DV_II_46_0_bit 	=;
static const uint32_t DV_II_46_2_bit 	=;
static const uint32_t DV_II_47_0_bit 	=;
static const uint32_t DV_II_48_0_bit 	=;
static const uint32_t DV_II_49_0_bit 	=;
static const uint32_t DV_II_49_2_bit 	=;
static const uint32_t DV_II_50_0_bit 	=;
static const uint32_t DV_II_50_2_bit 	=;
static const uint32_t DV_II_51_0_bit 	=;
static const uint32_t DV_II_51_2_bit 	=;
static const uint32_t DV_II_52_0_bit 	=;
static const uint32_t DV_II_53_0_bit 	=;
static const uint32_t DV_II_54_0_bit 	=;
static const uint32_t DV_II_55_0_bit 	=;
static const uint32_t DV_II_56_0_bit 	=;

dv_info_t sha1_dvs[] =;
void ubc_check(const uint32_t W[80], uint32_t dvmask[1])
{}

#ifdef SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
#include SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
#endif