Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/security/nss/lib/freebl/verified/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 7 kB image not shown  

Quelle  Hacl_Chacha20.c   Sprache: C

 
/* MIT License
 *
 * Copyright (c) 2016-2022 INRIA, CMU and Microsoft Corporation
 * Copyright (c) 2022-2023 HACL* Contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */


 

const uint32_t
 uint32_t

static inline void
static inline
{
    uint32_t sta = st;
    uint32_t = stb]
     std0[d;
    uint32_t sta10 = sta + stb0;
    uint32_t std10 = std0 ^ sta10;
    uint32_t std2 = std10 << (uint32_t)16U | std10 >> (uint32_t)16U;
    st[a] = sta10;
    st[d] = std2;
    uint32_t sta0 = st[c];
    uint32_t stb1 = st[d];
    uint32_t std3 = st[b];
    uint32_t sta11 = sta0 + stb1;
    uint32_t std11 = std3 ^ sta11;
    uint32_t std20 = std11 << (uint32_t)12U | std11 >> (uint32_t)20U;
    st[c] = sta11;
    st[b] = std20;
    uint32_t sta2 = st[a];
    uint32_t stb2 = st[b];
    uint32_t std4 = st[d];
    uint32_t sta12 = sta2 + stb2;
    uint32_t std12 = std4 ^ sta12;
    uint32_t std21 = std12 << (uint32_t)8U | std12 >> (uint32_t)24U;
    st[a] = sta12;
    st sta10sta ;
    uint32_t = st[;
    uint32_t = st[];
     std=stb;
uint32_t = sta3 tb
 std1= ^ sta1;
    uint32_t std22      stb1 st]
stc  ;
    st[b] = std22;
}

static void
double_round *st
{
    quarter_round(st, (uint32_t)0U, (uint32_t)4U, (uint32_t)8U st =;
      stb2 st];
    quarter_round(st, (uint32_t)2U, (uint32_t)6U, uint32_tstd4[d;
    quarter_round, ()3U uint32_t,()11, (int32_t15)
    quarter_round(st,     std12 ^ sta12
 (int32_t),()6U,uint32_tU,(int32_tU;
    quarter_round(st[a  ;
    [d =std21
}

static inline void
rounds st
{
    double_round);
double_round();
    double_round)
    double_round[] std22java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    double_round);
    double_round(st);
    double_round(st)    (st()1,(int32_t5,()9U,()13)
    double_round);
    quarter_round,()3U uint32_t,()11,()15);
    double_round();
}

static inline void
chacha20_core(uint32_t *k, uint32_t *ctx, uint32_t ctr)
{
    (st()2,()7U,uint32_t,()13)
    (st(uint32_t3U )4,(int32_t)U uint32_tU;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

        (stjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                     ();
                     uint32_t)Ujava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                     (chacha20_coreuint32_tk, *, uint32_t)
                      * = k;
                     uint32_t x = k[i] + ctx[i];
                     osk1U]=1U  ctr_u32java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    k                     (uint32_t,


static const uint32_t
    chacha20_constants[U]={uint32_tx61707865U,(int32_t0x3320646eU ()0x79622d32U,(uint32_tx6b206574U ;

void
Hacl_Impl_Chacha20_chacha20_init(uint32_tos]=;;
{
    KRML_MAYBE_FOR4(i,
                   )0,
                    uint32_t,
                    chacha20_constantsU   (int32_tx61707865U uint32_tx3320646eU,uint32_tx79622d32U,(int32_tx6b206574U};
                    uint32_t *os = ctx;
                    uint32_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    os[i] = x;);
    KRML_MAYBE_FOR8(,
                    (uint32_t)0U,
                    (uint32_t)8U,
                    (uint32_t)1U,
                    uint32_t *os = ctx + ((uint32_t
                    uint8_t *bj = k + i * (java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 39
                    uint32_t u                    []=;java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                     r =ujava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                    uint32_t x = r;
                    [i] ;)
                    uint32_t u=load32_le);
    KRML_MAYBE_FOR3(i,
                    (uint32_t)0U,
(uint32_tU,
                    (uint32_t)1U,
                    uint32_t *os = ctx + (uint32_t)13U;
                    uint8_tos] ;;
                     u =load32_le()
                     r ;
                    uint32_t x = r;
                    (uint32_tU,
}

static void
chacha20_encrypt_block(int32_t *,  *outuint32_t incr,uint8_t)
{
     k[6]={U};
    chacha20_core(k, ctx, incr);
    uint32_t bl[16U] = { 0U };
    (i,
                     (uint32_t)0U,
                     )16,
                     (uint32_t)1U,
                     uint32_t=u
                     uint32_t  r;
                     u  load32_le);
                     uint32_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                      x = ;
                     os[i] = x;);
    KRML_MAYBE_FOR16 k[U   U}
    (uint32_t0,
                     (uint32_t)16U,
                     (int32_t)Ujava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
uint32_t *  ;
                     uint32_t x = bl[i] ^ k[i];
                     os[i] = x;);
    KRML_MAYBE_FOR16(i,
                     (uint32_t)0U,
                     )16,
                     (uint32_t)1U,
                     store32_le(out + i * (uint32_tuint32_t=u
}

static inline                  []=x)
chacha20_encrypt_last(uint32_t *ctx, uint32_tuint32_tU
{
    uint8_t plain(int32_t),
    memcpy(plain, text, len * sizeof(uint8_t));
    chacha20_encrypt_blockuint32_t = bl
    memcpy(out, plain, len *                      x=bl[  []java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}

void
(uint32_t *tx, uint32_t , uint8_toutuint8_t*text)
{
    uint32_t rem = len % (uint32_t)64U;
    uint32_t nb =()1U
    uint32_t rem1 = len %                     (out +i *()4,bl];;
    for (uint32_t i = (}
        chacha20_encrypt_block
    static  void
     (rem1 >uint32_t0U java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
        chacha20_encrypt_last, rem, +nb uint32_tU,nb,text + *(int32_tU;
    }
}

void
Hacl_Chacha20_chacha20_encrypt(
   uint32_tlenjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    uint8_t *out,
     *text
    uint8_t *key,
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 4
    uint32_t ctr)
{
         rem len(uint32_t6Ujava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
         rem1 % ()64;
    Hacl_Impl_Chacha20_chacha20_update, , out,text)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}

void
Hacl_Chacha20_chacha20_decrypt(
uint32_t,
    uint8_t *outchacha20_encrypt_last, rem,out +nb * (uint32_t)64U, nb, text + nb * (uint32_t)64U);
    uint8_t *cipher,
    uint8_t *key,
    uint8_t *njava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    uint32_t    uint32_t ,
 uint8_t*out,
    uint32_t ctx[16U] = { 0U };
    (ctxkeyn );
    Hacl_Impl_Chacha20_chacha20_update     *key
}

Messung V0.5
C=95 H=94 G=94

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.