linux/crypto/md4.c
<<
v3. v3. vp/spa vpspa class="lxr_search"> v3. ="+search" method="post" onsubmit="return do_search(this);"> v3. v3. v3.Search v3. vp/spa 3. ="ajax+*" method="post" onsubmit="return false;"> vpinput typ"3.hidden" nam"3.ajax_lookup" id3.ajax_lookup" lue="3."> 3.
pdiv id3.file_contents"
o o1p/a>pspa
 class="comment">/*op/spa
  o o2p/a>pspa
 class="comment"> * Cryptographic API.p/spa
  o o3p/a>pspa
 class="comment"> *p/spa
  o o4p/a>pspa
 class="comment"> * MD4 Message Digest Algorithm (RFC1320).p/spa
  o o5p/a>pspa
 class="comment"> *p/spa
  o o6p/a>pspa
 class="comment"> * Implementaon vaderived from Andrew Tridgell and Steve French'sp/spa
  o o7p/a>pspa
 class="comment"> * CIFS MD4 implementaon v, and the cryptoapi implementaon vp/spa
  o o8p/a>pspa
 class="comment"> * originally based  vathe public domain implementaon v writtenp/spa
  o o9p/a>pspa
 class="comment"> * by Colin Plumb in 1993.p/spa
  o v3.1a>pspa
 class="comment"> *p/spa
  o 11p/a>pspa
 class="comment"> * Copyright (c) Andrew Tridgell 1997-1998.p/spa
  o 12p/a>pspa
 class="comment"> * Modified by Steve French (sfrench@us.ibm.com) 2002p/spa
  o 13p/a>pspa
 class="comment"> * Copyright (c) Cryptoapi developers.p/spa
  o 14p/a>pspa
 class="comment"> * Copyright (c) 2002 David S. Miller (davem@redhat.com)p/spa
  o 15p/a>pspa
 class="comment"> * Copyright (c) 2002 Jam"s Morris <jmorris@intercode.com.au>p/spa
  o 16p/a>pspa
 class="comment"> *p/spa
  o 17p/a>pspa
 class="comment"> * This program is free software; you ca
 redistribute it and/or modifyp/spa
  o 18p/a>pspa
 class="comment"> * it underathe terms ofathe GNU General Public License as published byp/spa
  o 19p/a>pspa
 class="comment"> * the Free Software Foundaon v; eitheraversn v 2 ofathe License, orp/spa
  o 23.1a>pspa
 class="comment"> * (at your tion>
) any lateraversn v.p/spa
  o 21p/a>pspa
 class="comment"> *p/spa
  o 22p/a>pspa
 class="comment"> */p/spa
  o 23p/a>#include <crypto/internal/hash.hp/a>> o 24p/a>#include <linux/init.hp/a>> o 25p/a>#include <linux/kernel.hp/a>> o 26p/a>#include <linux/module.hp/a>> o 27p/a>#include <linux/string.hp/a>> o 28p/a>#include <linux/typ"s.hp/a>> o 29p/a>#include <asm/byteorder.hp/a>> o 33.1a> o 31p/a>#defineopa href="+code=MD4_DIGEST_SIZE" class="sref">MD4_DIGEST_SIZEp/a>         16 o 32p/a>#defineopa href="+code=MD4_HMAC_BLOCK_SIZE" class="sref">MD4_HMAC_BLOCK_SIZEp/a>     64 o 33p/a>#defineopa href="+code=MD4_BLOCK_WORDS" class="sref">MD4_BLOCK_WORDSp/a>         16 o 34p/a>#defineopa href="+code=MD4_HASH_WORDS" class="sref">MD4_HASH_WORDSp/a>          4 o 35.1a> o 36p/a>structopa href="+code=md4_ctx" class="sref">md4_ctxp/a> { o 37p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=hash" class="sref">hashp/a>[pa href="+code=MD4_HASH_WORDS" class="sref">MD4_HASH_WORDSp/a>]; o 38p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=block" class="sref">blockp/a>[pa href="+code=MD4_BLOCK_WORDS" class="sref">MD4_BLOCK_WORDSp/a>]; o 39p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=byte_count" class="sref">byte_countp/a>; o 43.1a>}; o 41.1a> o 42p/a>static pa href="+code=inline" class="sref">inlinep/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=lshift" class="sref">lshiftp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=x" class="sref">xp/a>, unsigned int pa href="+code=s" class="sref">sp/a>) o 43p/a>{ o 44p/a>        pa href="+code=x" class="sref">xp/a> &= 0xFFFFFFFF; o 45p/a>        return ((pa href="+code=x" class="sref">xp/a> << pa href="+code=s" class="sref">sp/a>) & 0xFFFFFFFF) | (pa href="+code=x" class="sref">xp/a> >> (32 - pa href="+code=s" class="sref">sp/a>)); o 46p/a>} o 47.1a> o 48p/a>static pa href="+code=inline" class="sref">inlinep/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=F" class="sref">Fp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=x" class="sref">xp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=y" class="sref">yp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=z" class="sref">zp/a>) o 49p/a>{ o 50p/a>        return (pa href="+code=x" class="sref">xp/a> & pa href="+code=y" class="sref">yp/a>) | ((~pa href="+code=x" class="sref">xp/a>) & pa href="+code=z" class="sref">zp/a>); o 51p/a>} o 52.1a> o 53p/a>static pa href="+code=inline" class="sref">inlinep/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=G" class="sref">Gp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=x" class="sref">xp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=y" class="sref">yp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=z" class="sref">zp/a>) o 54p/a>{ o 55p/a>        return (pa href="+code=x" class="sref">xp/a> & pa href="+code=y" class="sref">yp/a>) | (pa href="+code=x" class="sref">xp/a> & pa href="+code=z" class="sref">zp/a>) | (pa href="+code=y" class="sref">yp/a> & pa href="+code=z" class="sref">zp/a>); o 56p/a>} o 57.1a> o 58p/a>static pa href="+code=inline" class="sref">inlinep/a> pa href="+code=u32" class="sref">u32p/a> pa href="+code=H" class="sref">Hp/a>(pa href="+code=u32" class="sref">u32p/a> pa href="+code=x" class="sref">xp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=y" class="sref">yp/a>, pa href="+code=u32" class="sref">u32p/a> pa href="+code=z" class="sref">zp/a>) o 59p/a>{ o 60p/a>        return pa href="+code=x" class="sref">xp/a> ^ pa href="+code=y" class="sref">yp/a> ^ pa href="+code=z" class="sref">zp/a>; o 61p/a>} o 62.1a> o 63p/a>#defineopa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=a" class="sref">ap/a>,pa href="+code=b" class="sref">bp/a>,pa href="+code=c" class="sref">cp/a>,pa href="+code=d" class="sref">dp/a>,pa href="+code=k" class="sref">kp/a>,pa href="+code=s" class="sref">sp/a>) (pa href="+code=a" class="sref">ap/a> = pa href="+code=lshift" class="sref">lshiftp/a>(pa href="+code=a" class="sref">ap/a> + pa href="+code=F" class="sref">Fp/a>(pa href="+code=b" class="sref">bp/a>,pa href="+code=c" class="sref">cp/a>,pa href="+code=d" class="sref">dp/a>) + pa href="+code=k" class="sref">kp/a>, pa href="+code=s" class="sref">sp/a>)) o 64p/a>#defineopa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=a" class="sref">ap/a>,pa href="+code=b" class="sref">bp/a>,pa href="+code=c" class="sref">cp/a>,pa href="+code=d" class="sref">dp/a>,pa href="+code=k" class="sref">kp/a>,pa href="+code=s" class="sref">sp/a>) (pa href="+code=a" class="sref">ap/a> = pa href="+code=lshift" class="sref">lshiftp/a>(pa href="+code=a" class="sref">ap/a> + pa href="+code=G" class="sref">Gp/a>(pa href="+code=b" class="sref">bp/a>,pa href="+code=c" class="sref">cp/a>,pa href="+code=d" class="sref">dp/a>) + pa href="+code=k" class="sref">kp/a> + (pa href="+code=u32" class="sref">u32p/a>)0x5A827999,pa href="+code=s" class="sref">sp/a>)) o 65p/a>#defineopa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=a" class="sref">ap/a>,pa href="+code=b" class="sref">bp/a>,pa href="+code=c" class="sref">cp/a>,pa href="+code=d" class="sref">dp/a>,pa href="+code=k" class="sref">kp/a>,pa href="+code=s" class="sref">sp/a>) (pa href="+code=a" class="sref">ap/a> = pa href="+code=lshift" class="sref">lshiftp/a>(pa href="+code=a" class="sref">ap/a> + pa href="+code=H" class="sref">Hp/a>(pa href="+code=b" class="sref">bp/a>,pa href="+code=c" class="sref">cp/a>,pa href="+code=d" class="sref">dp/a>) + pa href="+code=k" class="sref">kp/a> + (pa href="+code=u32" class="sref">u32p/a>)0x6ED9EBA1,pa href="+code=s" class="sref">sp/a>)) o 66.1a> o 67p/a>pspa
 class="comment">/* XXX: this stuff ca
 be tionmized */p/spa
  o 68p/a>static pa href="+code=inline" class="sref">inlinep/a> void pa href="+code=le32_to_cpu_array" class="sref">le32_to_cpu_arrayp/a>(pa href="+code=u32" class="sref">u32p/a> *pa href="+code=buf" class="sref">bufp/a>, unsigned int pa href="+code=words" class="sref">wordsp/a>) o 69p/a>{ o 70p/a>        while (pa href="+code=words" class="sref">wordsp/a>--) { o 71p/a>                pa href="+code=__le32_to_cpus" class="sref">__le32_to_cpusp/a>(pa href="+code=buf" class="sref">bufp/a>); o 72p/a>                pa href="+code=buf" class="sref">bufp/a>++; o 73p/a>        } o 74p/a>} o 75.1a> o 76p/a>static pa href="+code=inline" class="sref">inlinep/a> void pa href="+code=cpu_to_le32_array" class="sref">cpu_to_le32_arrayp/a>(pa href="+code=u32" class="sref">u32p/a> *pa href="+code=buf" class="sref">bufp/a>, unsigned int pa href="+code=words" class="sref">wordsp/a>) o 77p/a>{ o 78p/a>        while (pa href="+code=words" class="sref">wordsp/a>--) { o 79p/a>                pa href="+code=__cpu_to_le32s" class="sref">__cpu_to_le32sp/a>(pa href="+code=buf" class="sref">bufp/a>); o 80p/a>                pa href="+code=buf" class="sref">bufp/a>++; o 81p/a>        } o 82p/a>} o 83.1a> o 84p/a>static void pa href="+code=md4_transform" class="sref">md4_transformp/a>(pa href="+code=u32" class="sref">u32p/a> *pa href="+code=hash" class="sref">hashp/a>, pa href="+code=u32" class="sref">u32p/a> const *pa href="+code=in" class="sref">inp/a>) o 85p/a>{ o 86p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>; o 87.1a> o 88p/a>        pa href="+code=a" class="sref">ap/a> = pa href="+code=hash" class="sref">hashp/a>[0]; o 89p/a>        pa href="+code=b" class="sref">bp/a> = pa href="+code=hash" class="sref">hashp/a>[1]; o 90p/a>        pa href="+code=c" class="sref">cp/a> = pa href="+code=hash" class="sref">hashp/a>[2]; o 91p/a>        pa href="+code=d" class="sref">dp/a> = pa href="+code=hash" class="sref">hashp/a>[3]; o 92.1a> o 93p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[0], 3); o 94p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[1], 7); o 95p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[2], 11); o 96p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[3], 19); o 97p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[4], 3); o 98p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[5], 7); o 99p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[6], 11); o100p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[7], 19); o101p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[8], 3); o102p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[9], 7); o103p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[10], 11); o104p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[11], 19); o105p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[12], 3); o106p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[13], 7); o107p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[14], 11); o108p/a>        pa href="+code=ROUND1" class="sref">ROUND1p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[15], 19); o109.1a> o110p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>,pa href="+code=in" class="sref">inp/a>[ 0], 3); o111p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[4], 5); o112p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[8], 9); o113p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[12], 13); o114p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[1], 3); o115p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[5], 5); o116p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[9], 9); o117p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[13], 13); o118p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[2], 3); o119p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[6], 5); o120p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[10], 9); o121p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[14], 13); o122p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[3], 3); o123p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[7], 5); o124p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[11], 9); o125p/a>        pa href="+code=ROUND2" class="sref">ROUND2p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[15], 13); o126.1a> o127p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>,pa href="+code=in" class="sref">inp/a>[ 0], 3); o128p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[8], 9); o129p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[4], 11); o130p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[12], 15); o131p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[2], 3); o132p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[10], 9); o133p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[6], 11); o134p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[14], 15); o135p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[1], 3); o136p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[9], 9); o137p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[5], 11); o138p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[13], 15); o139p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=in" class="sref">inp/a>[3], 3); o140p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=in" class="sref">inp/a>[11], 9); o141p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=b" class="sref">bp/a>, pa href="+code=in" class="sref">inp/a>[7], 11); o142p/a>        pa href="+code=ROUND3" class="sref">ROUND3p/a>(pa href="+code=b" class="sref">bp/a>, pa href="+code=c" class="sref">cp/a>, pa href="+code=d" class="sref">dp/a>, pa href="+code=a" class="sref">ap/a>, pa href="+code=in" class="sref">inp/a>[15], 15); o143.1a> o144p/a>        pa href="+code=hash" class="sref">hashp/a>[0] += pa href="+code=a" class="sref">ap/a>; o145p/a>        pa href="+code=hash" class="sref">hashp/a>[1] += pa href="+code=b" class="sref">bp/a>; o146p/a>        pa href="+code=hash" class="sref">hashp/a>[2] += pa href="+code=c" class="sref">cp/a>; o147p/a>        pa href="+code=hash" class="sref">hashp/a>[3] += pa href="+code=d" class="sref">dp/a>; o148p/a>} o149.1a> o150p/a>static pa href="+code=inline" class="sref">inlinep/a> void pa href="+code=md4_transform_helper" class="sref">md4_transform_helperp/a>(structopa href="+code=md4_ctx" class="sref">md4_ctxp/a> *pa href="+code=ctx" class="sref">ctxp/a>) o151p/a>{ o152p/a>        pa href="+code=le32_to_cpu_array" class="sref">le32_to_cpu_arrayp/a>(pa href="+code=ctx" class="sref">ctxp/a>->pa href="+code=block" class="sref">blockp/a>, pa href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZEp/a>(pa href="+code=ctx" class="sref">ctxp/a>->pa href="+code=block" class="sref">blockp/a>)); o153p/a>        pa href="+code=md4_transform" class="sref">md4_transformp/a>(pa href="+code=ctx" class="sref">ctxp/a>->pa href="+code=hash" class="sref">hashp/a>, pa href="+code=ctx" class="sref">ctxp/a>->pa href="+code=block" class="sref">blockp/a>); o154p/a>} o155.1a> o156p/a>static int pa href="+code=md4_init" class="sref">md4_initp/a>(structopa href="+code=shash_desc" class="sref">shash_descp/a> *pa href="+code=desc" class="sref">descp/a>) o157p/a>{ o158p/a>        structopa href="+code=md4_ctx" class="sref">md4_ctxp/a> *pa href="+code=mctx" class="sref">mctxp/a> = pa href="+code=shash_desc_ctx" class="sref">shash_desc_ctxp/a>(pa href="+code=desc" class="sref">descp/a>); o159.1a> o160p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=hash" class="sref">hashp/a>[0] = 0x67452301; o161p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=hash" class="sref">hashp/a>[1] = 0xefcdab89; o162p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=hash" class="sref">hashp/a>[2] = 0x98badcfe; o163p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=hash" class="sref">hashp/a>[3] = 0x10325476; o164p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=byte_count" class="sref">byte_countp/a> = 0; o165.1a> o166p/a>        return 0; o167p/a>} o168p/a> o169p/a>static int pa href="+code=md4_update" class="sref">md4_updatep/a>(structopa href="+code=shash_desc" class="sref">shash_descp/a> *pa href="+code=desc" class="sref">descp/a>, const pa href="+code=u8" class="sref">u8p/a> *pa href="+code=data" class="sref">datap/a>, unsigned int pa href="+code=len" class="sref">lenp/a>) o170p/a>{ o171p/a>        structopa href="+code=md4_ctx" class="sref">md4_ctxp/a> *pa href="+code=mctx" class="sref">mctxp/a> = pa href="+code=shash_desc_ctx" class="sref">shash_desc_ctxp/a>(pa href="+code=desc" class="sref">descp/a>); o172p/a>        const pa href="+code=u32" class="sref">u32p/a> pa href="+code=avail" class="sref">availp/a> = sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>) - (pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=byte_count" class="sref">byte_countp/a> & 0x3f); o173.1a> o174p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=byte_count" class="sref">byte_countp/a> += pa href="+code=len" class="sref">lenp/a>; o175.1a> o176p/a>        if (pa href="+code=avail" class="sref">availp/a> > pa href="+code=len" class="sref">lenp/a>) { o177p/a>                pa href="+code=memcpy" class="sref">memcpyp/a>((char *)pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a> + (sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>) - pa href="+code=avail" class="sref">availp/a>), o178p/a>                       pa href="+code=data" class="sref">datap/a>, pa href="+code=len" class="sref">lenp/a>); o179p/a>                return 0; o180p/a>        } o181.1a> o182p/a>        pa href="+code=memcpy" class="sref">memcpyp/a>((char *)pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a> + (sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>) - pa href="+code=avail" class="sref">availp/a>), o183p/a>               pa href="+code=data" class="sref">datap/a>, pa href="+code=avail" class="sref">availp/a>); o184p/a> o185p/a>        pa href="+code=md4_transform_helper" class="sref">md4_transform_helperp/a>(pa href="+code=mctx" class="sref">mctxp/a>); o186p/a>        pa href="+code=data" class="sref">datap/a> += pa href="+code=avail" class="sref">availp/a>; o187p/a>        pa href="+code=len" class="sref">lenp/a> -= pa href="+code=avail" class="sref">availp/a>; o188p/a> o189p/a>        while (pa href="+code=len" class="sref">lenp/a> >= sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>)) { o190p/a>                pa href="+code=memcpy" class="sref">memcpyp/a>(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>, pa href="+code=data" class="sref">datap/a>, sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>)); o191p/a>                pa href="+code=md4_transform_helper" class="sref">md4_transform_helperp/a>(pa href="+code=mctx" class="sref">mctxp/a>); o192p/a>                pa href="+code=data" class="sref">datap/a> += sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>); o193p/a>                pa href="+code=len" class="sref">lenp/a> -= sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>); o194p/a>        } o195.1a> o196p/a>        pa href="+code=memcpy" class="sref">memcpyp/a>(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>, pa href="+code=data" class="sref">datap/a>, pa href="+code=len" class="sref">lenp/a>); o197.1a> o198p/a>        return 0; o199p/a>} o200p/a> o201p/a>static int pa href="+code=md4_final" class="sref">md4_finalp/a>(structopa href="+code=shash_desc" class="sref">shash_descp/a> *pa href="+code=desc" class="sref">descp/a>, pa href="+code=u8" class="sref">u8p/a> *pa href="+code=out" class="sref">outp/a>) o202p/a>{ o203p/a>        structopa href="+code=md4_ctx" class="sref">md4_ctxp/a> *pa href="+code=mctx" class="sref">mctxp/a> = pa href="+code=shash_desc_ctx" class="sref">shash_desc_ctxp/a>(pa href="+code=desc" class="sref">descp/a>); o204p/a>        const unsigned int pa href="+code=offset" class="sref">offsetp/a> = pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=byte_count" class="sref">byte_countp/a> & 0x3f; o205p/a>        char *pa href="+code=p" class="sref">pp/a> = (char *)pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a> + pa href="+code=offset" class="sref">offsetp/a>; o206p/a>        int pa href="+code=padding" class="sref">paddingp/a> = 56 - (pa href="+code=offset" class="sref">offsetp/a> + 1); o207.1a> o208p/a>        *pa href="+code=p" class="sref">pp/a>++ = 0x80; o209p/a>        if (pa href="+code=padding" class="sref">paddingp/a> < 0) { o210p/a>                pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=p" class="sref">pp/a>, 0x00, pa href="+code=padding" class="sref">paddingp/a> + sizeof (pa href="+code=u64" class="sref">u64p/a>)); o211p/a>                pa href="+code=md4_transform_helper" class="sref">md4_transform_helperp/a>(pa href="+code=mctx" class="sref">mctxp/a>); o212p/a>                pa href="+code=p" class="sref">pp/a> = (char *)pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>; o213p/a>                pa href="+code=padding" class="sref">paddingp/a> = 56; o214p/a>        } o215.1a> o216p/a>        pa href="+code=memset" class="sref">memsetp/a>(pa href="+code=p" class="sref">pp/a>, 0, pa href="+code=padding" class="sref">paddingp/a>); o217p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>[14] = pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=byte_count" class="sref">byte_countp/a> << 3; o218p/a>        pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>[15] = pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=byte_count" class="sref">byte_countp/a> >> 29; o219p/a>        pa href="+code=le32_to_cpu_array" class="sref">le32_to_cpu_arrayp/a>(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>, (sizeof(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>) - o220p/a>                          sizeof(pa href="+code=u64" class="sref">u64p/a>)) / sizeof(pa href="+code=u32" class="sref">u32p/a>)); o221p/a>        pa href="+code=md4_transform" class="sref">md4_transformp/a>(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=hash" class="sref">hashp/a>, pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=block" class="sref">blockp/a>); o222p/a>        pa href="+code=f">ROUND1p/a>(pa href="+code=d" class="sref">dp/a>, pa href="+code=a"mctx" class="sref">mctxp/a>->pa href="+code=hash" class="sref">hashp/a>, pa href="+code=ARRAY_SIZE" class="sref">ARRAY_SIZEp/a>(pa href="+c" class="/md4ss="ass="sref">dp/a>, pa hre2="+co2e=in" class="sref">inp/a>[3],.1a> (pa href="+code=mctx" class="sref">mctxp/a>->pa hrefhref="+code=d" class="sref">dp/a>(pa href="+code=mctx" class="sref">mctxp/a>->pa href="+code=blAY_SIZE" class="sref">ARRAY_SIZEp/a>(pa href="+c" class=/a>      ass="sref">cp/a>, pa hre2="+co2e=in" class="sref">inp/a>[7],.1a> mctxp/a>-&o216pp/a>(pa" class="line" nam"3.L203">o203p/a>        _SIZEp/a>(pa href="+c" class=="crypto/ss="sref">bp/a>, pa href2"+cod22e" nam"3.L214">o214p/a>       de=a" cla2s="sref">ap/a>, pa href=2+code22lass="line" nam"3.L165">o165.1a> o166p/a>        return 2code=d" c2ass="sref">dp/a>,pa href2"+cod22e=avail" class="sref">availp/2code=c" c2ass="sref">cp/a>, pa hre2="+co22lass="line" " class="line" nam"3.L201">oalcode=memset" cla201">oalcass="="line" nam"3.Lalcode=memset" claalcass="=ass="line" nam"3.L209">o209ode=b" cl2ss="sref">bp/a>, pa href2"+cod2=in" class="sr.+code=mctx" clasigestp/a>sref">mctxp/a> =igestp/a>n" class==lass="sref">inp/a>[7],MD4_DIGEST=a"mctx" class="srefMD4_DIGEST=a"mca>-&os="line" nam"3.L209">o209oass="srefs="sref">ap/a>, pa href=2+code2in" class="sre.+code=mctx" cla href="crypto/md4.c6" id3.Lblockp/a>) =lass="sref">inp/a>[7],> o209o class="sass="sref">dp/a>, pa hre2="+co2e=in" class="s.+code=mctx" cla href="crypto/md4.c#L id3.L169"ockp/a>) =lass="sref">inp/a>[7],> o209o"/md4ss="ss="sref">cp/a>, pa href2"+cod2=in" class="sr.+code=mctx" cla href="crypto/md4.c#" id3.L20lockp/a>) =lass="sref">inp/a>[7],> o209o/a>      ss="sref">bp/a>, pa href2"+cod2=in" class="sr.+code=mctx" clasescp/a>sref">mctxp/a> =escp/a>n" class="s=lass="sp/a>(pam"3.L202">o202p/a>{ ->pa href="+code=bloc2de=a" cla2s="sref">ap/a>, pa href=2+code2in" class="sre.+code=mctx" clabas>sref">mctxp/a> bas>d3.Lblockp/a>) =lass="sss="line" nam"3.L209">o209oe=a" cla2ass="sref">dp/a>, pa hre2="+co2e=in" class="sass="sre.+code=mctx" clacra_ pa pto/md4.c#L222" ra_ pa n" class="s=lass="s"09""o209o; cp/a>, pa hre2="+co23ode=len" class="sref".+code=mctx" clacra_flagspto/md4.c#L222" ra_flagsde=len" cl=lass="sref">inp/a>[7],CRYPTO_ALG_TYPE_SHASHpto/md4.c#L222"CRYPTO_ALG_TYPE_SHASH.L20os="line" nam"3.L209">o209oode=d" c2ss="sref">bp/a>, pa href2"+cod2=in" class="srs="sref".+code=mctx" clacra_"srefp/a>sref">mctxp/a> cra_"srefp/a>n" cla=lass="sref">inp/a>[7],MD4_HMAC_BLOCK=a"mctx" class="srefMD4_HMAC_BLOCK=a"mc.L20os="line" nam"3.L209">o209oode=c" c2s="sref">ap/a>, pa href=2+code23code=len" class="sref.+code=mctx" clacra_modul>sref">mctxp/a> cra_modul>n" class==lass="sref">inp/a>[7],THIS_MODULctx" class="srefTHIS_MODULc.L20os="line" nam"3.L209">o209code=d" c2ass="sref">dp/a>, pa hre2="+co24179p/a>                return 0; cp/a>, pa href2"+cod2=in" c}5">o165.1a> bp/a>, pa href2"+cod2=in" c">o165.1a> ap/a>, pa href=2+code2in" cl"line" nam"3.L200">o200p/a_a href="crypto/md4.c_56" id3.L02">o202p/a>{ descp/a>, pa href); o209de=hash" 2lass="sref">hashp/a>[0] 2= pa 2ref="+code=a" am"3.L1+code=mctx" clacr"3.L_register_sAY_SIZE" class="srecr"3.L_register_sAY_SL216"href=="line" nam"3.Lalcode=memset" claalcass=SIZEp/a>(pa href="+c" classde=hash" 2lass="sref">hashp/a>[1] 2= pa 2ref="+          return 0; hashp/a>[2] 2= pa 24t" class="sref">offsetp/a> + 1de=hash" 2lass="sref">hashp/a>[3] 2= pa 2ref="+"line" " id3.L150" class="l__exref="crypto/md4.c_5exred3.L02">o202p/a>{ descp/a>, pa href)ode=c" c2"crypto/md4.c#L148" id3.2148" 2lass="ss="line" nam"3.L209">o209>} o159cr"3.L_unregister_sAY_SIZE" class="srecr"3.L_unregister_sAY_SL216"href=="line" nam"3.Lalcode=memset" claalcass=SIZEp/a>(pa href="+c" class4_ctx" cl2ss="sref">md4_ctxp/a> *p2 href2"+code          return 0; o165.1a> ctxp/a>->pa href2"+cod2=block2">o202p/a>{ a href="crypto/md4.c#odul>a hreL216" id3.L216" clasthremoda href="crypto/md4.c#L15moda hreL216SIZEp/a>(pa href="+c" class4; ctxp/a>->pa hre2="+co2e=bloc2">o202p/a>{ aexref="crypto/md4.c odul>aexreL216" id3.L216" clasthremoda" iif="crypto/md4.c#L15moda" iiL216SIZEp/a>(pa href="+c" class4e=hash" 2"crypto/md4.c#L154" id3.2154" 2lass="line" nam"3.L154">o154p/2>} inp/a>[7],MODULc_LICENSctx" class="srefMODULc_LICENScL216" spanto/md4.c#tr"+co>"GPL"(pa href="+c" class4; shash_descp/a> *pa 2ref="2code=dref">inp/a>[7],MODULc_DESCRIPTIONtx" class="srefMODULc_DESCRIPTIONL216" spanto/md4.c#tr"+co>"MD4 Message Digest Algorithm"(pa href="+c" class4e=hash" 2"crypto/md4.c#L157" id3.2157" 25e=avail" class="sref">availp/2ass="sref2>shash_desc_ctxp/a>(pa h2ef="+2ode=de


The orig id3 LXR software by the l" class=http://sourceforge.net/projects/lxr">LXR commuhreya>-&o2this experimentd3 version by l" class=mailto:lxr@_ctux.no">lxr@_ctux.noa>-&. lxr._ctux.no kindly hosted by l" class=http://www.redpill-_ctpro.no">Redpill Lctpro ASa>-&o2provider of Lctuxss="sult"+c and operine="s services sincem"3.5.