Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9126 → Rev 9125

/programs/network/ssh/sshlib_host.inc
128,8 → 128,9
 
mpint_s dd ? ; rsa_signature_blob
 
k dd ? ; Key length
 
; k dd ? ; length of RSA modulus n
 
endl
 
DEBUGF 3, "SSH: Performing RSA verification\n"
172,8 → 173,7
add esi, 4
; mpint n
stdcall mpint_to_little_endian, [mpint_n], esi
and eax, not (32-1) ; CHECKME
mov [k], eax
; mov [k], eax ;; HMMMM FIXME, 0-byte..
 
; Signature
mov esi, [str_signature]
218,13 → 218,9
stosb
mov al, 0x01
stosb
mov ecx, [k]
sub ecx, (rsa_sha1_T.len + 3 + SHA1_HASH_SIZE)
jl .err_key
jz @f
mov ecx, 256 - (rsa_sha1_T.len + 3 + SHA1_HASH_SIZE)
mov al, 0xff
rep stosb
@@:
mov al, 0x00
stosb
mov esi, rsa_sha1_T
252,13 → 248,9
stosb
mov al, 0x01
stosb
mov ecx, [k]
sub ecx, (rsa_sha256_T.len + 3 + SHA256_HASH_SIZE)
jl .err_key
jz @f
mov ecx, 256 - (rsa_sha256_T.len + 3 + SHA256_HASH_SIZE)
mov al, 0xff
rep stosb
@@:
mov al, 0x00
stosb
mov esi, rsa_sha256_T
286,13 → 278,9
stosb
mov al, 0x01
stosb
mov ecx, [k]
sub ecx, (rsa_sha512_T.len + 3 + SHA512_HASH_SIZE)
jl .err_key
jz @f
mov ecx, 256 - (rsa_sha512_T.len + 3 + SHA512_HASH_SIZE)
mov al, 0xff
rep stosb
@@:
mov al, 0x00
stosb
mov esi, rsa_sha512_T
309,13 → 297,13
; RSA signature blob
stdcall mpint_to_little_endian, [mpint_s], esi
; cmp eax, [k]
; jne .err_signature
;;; jne .err_signature
 
; RSAVP1
stdcall mpint_modexp, [mpint_m], [mpint_s], [mpint_e], [mpint_n]
; I2OSP
stdcall mpint_shrink, [mpint_m]
stdcall mpint_grow, [mpint_m], [k]
stdcall mpint_grow, [mpint_m], 256
stdcall mpint_to_big_endian, [EM], [mpint_m]
 
; Compare EM with EM_accent
322,8 → 310,7
mov esi, [EM]
add esi, 4
mov edi, [EM_accent]
mov ecx, [k]
shr ecx, 2
mov ecx, 256/4
xor eax, eax
.ct_cmp_loop:
mov ebx, [esi]