Hi Junio,
On Thu, 30 Mar 2017, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
> > +#ifdef SHA1_DC_AND_OPENSSL
> > +void (*SHA1_Init_func)(SHA_CTX_union *ctx) = (void *)SHA1DCInit;
> > +void (*SHA1_Update_func)(SHA_CTX_union *ctx, const void *pointer, size_t
Junio C Hamano writes:
> ...
> The use of union is a good ingredient for a solution. I would have
> chosen to do this slightly differently if I were doing it.
>
> typedef struct {
> int safe;
> union {
>
Johannes Schindelin writes:
> +#ifdef SHA1_DC_AND_OPENSSL
> +void (*SHA1_Init_func)(SHA_CTX_union *ctx) = (void *)SHA1DCInit;
> +void (*SHA1_Update_func)(SHA_CTX_union *ctx, const void *pointer, size_t
> size) =
> + (void *)git_SHA1DCUpdate;
> +int
On Sat, Mar 25, 2017 at 12:24 AM, Johannes Schindelin
wrote:
> The collision detection is not for free, though: when using the SHA1DC
> code, calculating the SHA-1 takes substantially longer than using
> OpenSSL's (in some case hardware-accelerated) SHA1-routines, and
Nowadays, there are practical collision attacks on the SHA-1 algorithm.
For that reason, Git integrated code that detects attempts to sneak in
objects using those known attack vectors and enabled it by default.
The collision detection is not for free, though: when using the SHA1DC
code,
5 matches
Mail list logo