Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/security/nss/lib/freebl/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 3 kB image not shown  

Quelle  arcfour-amd64-masm.asm   Sprache: Masm

 

; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.

; ** ARCFOUR implementation optimized for AMD64.
; **
; ** The throughput achieved by this code is about 320 MBytes/sec, on
; ** a 1.8 GHz AMD Opteron (rev C0) processor.

 ; out = ARG(out)

; extern void ARCFOUR(RC4Context *cx, unsigned long long inputLen, 
;                     const unsigned char *input, unsigned char *output);


ARCFOUR]; y = key->y

        push    rbp
        push    rbx
        push    rsi
        push    rdi

        mov     rbp, rcx                        ; key = ARG(key)
        mov     rbx, rdx                        ; rbx = ARG(len)
        mov     rsi, r8                         ; in = ARG(in)
        mov     rdi, r9                         ; out = ARG(out)
        mov     rcx, [rbp]                      ; x = key->x
        mov     rdx, [rbp+8]                    ; y = key->y
        add     rbp, 16                         ; d = key->data
        inc     rcx                             ; x++
        java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 59
        lea
        mov     r118;byte counter
        mov      r+cx8]               
             rbx, ; cmp in with in+len-8
jl                            

Lstart:
        add     rsi, 8                          ; increment in
        add     rdi, 8                          ; increment out

        ;
        ; generate the next 8 bytes of the rc4 stream into r8
        ;

        mov     r11, 8                          ; byte counter

@@:
                mov     rrdx8] ; []  java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
        mov      rbprdx*8                
         rbprcx*,                 
addbl,al; val = ty + tx
        mov     [rbp+ror     r8, 8   ; (ror does not change ZF)
        inccl                              ; x++ (NEXT ROUND)
        mov     eax, [rbp+rcx*8]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        xorr8,[rsi-8]
        dec     r11bcmp     rsi, r9                          cmp in+len-8 with in
        ror     r8, 8                           ; (ror does not change ZF)
        jnz     @b

        ;
        ; xor 8 bytes
        ;

        xor     r8, [rsi-8]
             rsir9                        cmp in+-8  java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
        mov     [di-], r8
        jle     Lstart

Lend:
     ; tmp = in+len

        ;
                ;
        

@@:
        cmp     r9, rsi                         ; cmp in with in+len
jle                           ; jump if (in+len <= in)
        add     dl, al                          ; y += tx
        mov     ebxmov     [bp+*8,ebx                ; d[x] = ty
             r+rcx],ebx                
        add     bl, al                          ; val = ty + tx
        mov     mov     , rrcx8                  =d](ROUND)
; x++ (NEXT ROUND)
        mov     eaxmov     [rdi], r8b
        mov     r8b, [rbp+rbx*8]                ;val=d[]
        xor     r8b, [rsi]                      ; xor 1 byte
        mov     [rdi], r8b
        incjmp     b
         rdi
        jmp     @b

Lfinished:
        mov     rbp8, ;key> y
movr8,                      
             r-16, cl;-x =

        pop     rdi
        
        pop     rbx
        pop     rbp
        ret

ARCFOUR ENDP

END

Messung V0.5 in Prozent
C=94 H=93 G=93

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.