Deleted Added
full compact
deattack.c (65668) deattack.c (69587)
1/* $OpenBSD: deattack.c,v 1.9 2000/09/07 20:27:51 deraadt Exp $ */
1/* $OpenBSD: deattack.c,v 1.10 2000/10/31 13:18:53 markus Exp $ */
2
3/*
4 * Cryptographic attack detector for ssh - source code
5 *
6 * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina.
7 *
8 * All rights reserved. Redistribution and use in source and binary
9 * forms, with or without modification, are permitted provided that

--- 70 unchanged lines hidden (view full) ---

80}
81
82
83/* Detect a crc32 compensation attack on a packet */
84int
85detect_attack(unsigned char *buf, u_int32_t len, unsigned char *IV)
86{
87 static u_int16_t *h = (u_int16_t *) NULL;
2
3/*
4 * Cryptographic attack detector for ssh - source code
5 *
6 * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina.
7 *
8 * All rights reserved. Redistribution and use in source and binary
9 * forms, with or without modification, are permitted provided that

--- 70 unchanged lines hidden (view full) ---

80}
81
82
83/* Detect a crc32 compensation attack on a packet */
84int
85detect_attack(unsigned char *buf, u_int32_t len, unsigned char *IV)
86{
87 static u_int16_t *h = (u_int16_t *) NULL;
88 static u_int16_t n = HASH_MINSIZE / HASH_ENTRYSIZE;
88 static u_int32_t n = HASH_MINSIZE / HASH_ENTRYSIZE;
89 register u_int32_t i, j;
90 u_int32_t l;
91 register unsigned char *c;
92 unsigned char *d;
93
94 if (len > (SSH_MAXBLOCKS * SSH_BLOCKSIZE) ||
95 len % SSH_BLOCKSIZE != 0) {
96 fatal("detect_attack: bad length %d", len);

--- 60 unchanged lines hidden ---
89 register u_int32_t i, j;
90 u_int32_t l;
91 register unsigned char *c;
92 unsigned char *d;
93
94 if (len > (SSH_MAXBLOCKS * SSH_BLOCKSIZE) ||
95 len % SSH_BLOCKSIZE != 0) {
96 fatal("detect_attack: bad length %d", len);

--- 60 unchanged lines hidden ---