kDCDCby nameby namefreewared kC58DCDCDC658./lpp_nameb4 R I freeware.libgcrypt { freeware.libgcrypt.rte 01.02.001.000 01 N U en_US libgcrypt 1.2.1 [ % /usr 4 /usr/local 10 /usr/local/bin 7 /usr/local/lib 639 /usr/local/include 133 /usr/local/share 2 /usr/local/share/aclocal 9 /usr/local/info 410 /usr/lpp 2 /usr/lpp/freeware.libgcrypt INSTWORK 120 120 % % % % ] } kT (EDCDCDC6(./usr/lpp/freeware.libgcryptbE kz(:DCDCDC6(:./usr/lpp/freeware.libgcrypt/liblpp.ab 14364 0 0 128 11236 0 379 648 0 1125991631 0 0 644 25 freeware.libgcrypt.rte.al` ./errfile ./usr/local/bin/libgcrypt-config ./usr/local/lib/libgcrypt.a ./usr/local/lib/libgcrypt.la ./usr/local/include/gcrypt.h ./usr/local/include/gcrypt-module.h ./usr/local/share/aclocal/libgcrypt.m4 ./usr/local/info/dir ./usr/local/info/gcrypt.info ./usr/local ./usr/local/bin ./usr/local/lib ./usr/local/include ./usr/local/share ./usr/local/share/aclocal ./usr/local/info 1304 2098 128 1117485765 0 0 640 32 freeware.libgcrypt.rte.copyright` libgcrypt-1.2.1 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. All rights reserved. Plaese refer to the README file delivered in the directory /usr/local/lib/openssl-0.9.6.12 for complete details. The other files delivered in the same directory should also be read. Packaging is Copyright (C) 2005 BULL SA. This LPP shall not be redistributed commercially. Software, information and material distributed as freeware or shareware (hereinafter the "Materials") are provided "as is", without warranty of any kind. Bull and its suppliers disclaim all warranties whether expressed or implied, including, but not limited to the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Materials is with you. Neither Bull nor its suppliers warrant that the functions contained in the Materials will meet your requirements or that the Materials will be error free. Bull and its suppliers shall in no event be liable for direct or indirect damage caused to the User or to third parties by use of the Materials, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of the Materials. 2489 4734 648 1125991632 0 0 644 32 freeware.libgcrypt.rte.inventory` /errfile: owner = root group = system mode = 644 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 101 checksum = "44136 1 " /usr/local/bin/libgcrypt-config: owner = root group = system mode = 755 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 3472 checksum = "44518 4 " /usr/local/lib/libgcrypt.a: owner = root group = system mode = 755 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 325230 checksum = "07988 318 " /usr/local/lib/libgcrypt.la: owner = root group = system mode = 755 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 926 checksum = "01639 1 " /usr/local/include/gcrypt.h: owner = root group = system mode = 644 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 60330 checksum = "46429 59 " /usr/local/include/gcrypt-module.h: owner = root group = system mode = 644 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 6962 checksum = "08102 7 " /usr/local/share/aclocal/libgcrypt.m4: owner = root group = system mode = 644 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 4174 checksum = "43082 5 " /usr/local/info/dir: owner = root group = system mode = 644 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 610 checksum = "51937 1 " /usr/local/info/gcrypt.info: owner = root group = system mode = 644 type = FILE class = apply,inventory,freeware.libgcrypt.rte size = 208525 checksum = "08014 204 " /usr/local: owner = root group = system mode = SGID,755 type = DIRECTORY class = apply,inventory,freeware.libgcrypt.rte /usr/local/bin: owner = root group = system mode = SGID,755 type = DIRECTORY class = apply,inventory,freeware.libgcrypt.rte /usr/local/lib: owner = root group = system mode = SGID,755 type = DIRECTORY class = apply,inventory,freeware.libgcrypt.rte /usr/local/include: owner = root group = system mode = SGID,755 type = DIRECTORY class = apply,inventory,freeware.libgcrypt.rte /usr/local/share: owner = root group = system mode = SGID,755 type = DIRECTORY class = apply,inventory,freeware.libgcrypt.rte /usr/local/share/aclocal: owner = root group = system mode = SGID,755 type = DIRECTORY class = apply,inventory,freeware.libgcrypt.rte /usr/local/info: owner = root group = system mode = SGID,755 type = DIRECTORY class = apply,inventory,freeware.libgcrypt.rte 2611 7490 2098 1117485856 0 0 755 29 freeware.libgcrypt.rte.post_i` #!/usr/bin/ksh LANG=C VERBOSE=${VERBOSE:-"0"} # simple debug system appname="${0##*/}" # $(basename $0) # Pre- and Post install template scripts # Copyright (C) 2000 GROUPE BULL # all rights reserved. # # author: Ciaran Deignan (Ciaran.Deignan@bull.net) # started: July 1997, last modified July 2000 # version: 2.0 #------------------------------------------------------------------ # GLOBAL UTILITIES #------------------------------------------------------------------ # Debug message print function (v1.0 - July 1998) debug() { integer lev=$1 shift [ $VERBOSE -ge $lev ] && print -- "$@" >&2 return 0 } # error handler (v2.1 - July 1998): cmd() { debug 7 "CMD: execute '$@'" eval '"$@"' [ $? -ne 0 ] && debug 0 "$appname: CMD: error detected in '$@'" \ && exit 2 } typeset -xf cmd debug [ $VERBOSE -gt 9 ] && set -x #------------------------------------------------------------------ debug 2 "$appname: starting execution, params <$*>"; # Function to update the file /usr/local/info/dir # This function should be used if the LPP delivers files into # /usr/local/info # NOTE: the file /usr/local/info/dir should *never* be delivered directly... update_info_dir() { if ! [ -d /usr/local/info ] then debug 1 "No info directory found !" debug 1 "stopping" return 0 fi if type gen-dir-node >/dev/null 2>&1 then print "Updating info \"root\" file (/usr/local/info/dir)" cmd cd /usr/local/info [ -f dir ] && cmd mv dir dir.bak cmd gen-dir-node /usr/local/info/ > dir cmd chmod 444 dir fi } # Perl module update function... update_perllocal () { if [ "$PERLLIB" = "" ] || [ ! -d "$PERLLIB" ] then print "update_perllocal: PERLLIB not defined (=$PERLLIB)" return 0 fi archdir=${archdir:-"aix"} # the directory /usr/local/lib/perl5/ ($PERLLIB) should exist, or might # be a symbolic link to /usr/opt/perl5/lib.... if ! cd $PERLLIB/. then print "Perl not installed correctly, can't find directory" print "$PERLLIB" exit 1 fi if ! ls */$archdir/perllocal.pod > /dev/null 2>&1 then filename=$(ls -td 5.*/$archdir | line) if [ "$filename" = "" ] then cmd print "Perl not installed correctly, can't find \c" cmd print "directory $PERLLIB/5.00*/$archdir" exit 3 fi filename="$filename/perllocal.pod" else filename=$(cmd ls -t */$archdir/perllocal.pod | line) fi # use a "hello-script" to add info to perllocal.pod.... cmd cat >>$filename <&2 return 0 } # error handler (v2.1 - July 1998): cmd() { debug 7 "CMD: execute '$@'" eval '"$@"' [ $? -ne 0 ] && debug 0 "$appname: CMD: error detected in '$@'" \ && exit 2 } typeset -xf cmd debug [ $VERBOSE -gt 9 ] && set -x #------------------------------------------------------------------ debug 2 "$appname: starting execution, params <$*>"; slibclean # Function to allow perl modules compiled for a "freeware" (/usr/local) # perl to be installed on top of an "IBM" (/usr/opt/perl5) perl. make_perl_f2i_links() { # Clean up historic symbolic links if there's any... [ -h /usr/opt/perl5/lib ] && rm /usr/opt/perl5/lib [ -h /usr/opt/perl5/bin/perl ] && rm /usr/opt/perl5/bin/perl # Make /usr/local/lib/perl5 be a symbolic link to IBM perl lib dir. if [ ! -e /usr/local/lib/perl5 ] && [ -d /usr/opt/perl5/lib ] then [ -d /usr/local/lib ] || cmd mkdir -p /usr/local/lib cmd ln -s /usr/opt/perl5/lib /usr/local/lib/perl5 fi if [ ! -e /usr/local/bin/perl ] && [ -e /usr/opt/perl5/bin/perl ] then [ -d /usr/local/bin ] || cmd mkdir /usr/local/bin cmd ln -s /usr/opt/perl5/bin/perl /usr/local/bin/perl fi } # Function to allow perl modules compiled for an "IBM" (/usr/opt/perl5) # perl to be installed on top of a "freeware" (/usr/local) perl. make_perl_i2f_links() { # Clean up historic symbolic links if there's any... [ -h /usr/local/lib/perl5 ] && rm /usr/local/lib/perl5 [ -h /usr/local/bin/perl ] && rm /usr/local/bin/perl # Make /usr/opt/perl5/lib be a symbolic link to standard perl lib dir. if [ ! -e /usr/opt/perl5/lib ] && [ -d /usr/local/lib/perl5 ] then [ -d /usr/opt/perl5 ] || cmd mkdir -p /usr/opt/perl5 cmd ln -s /usr/local/lib/perl5 /usr/opt/perl5/lib fi if [ ! -e /usr/opt/perl5/bin/perl ] && [ -e /usr/local/bin/perl ] then [ -d /usr/opt/perl5/bin ] || cmd mkdir /usr/opt/perl5/bin cmd ln -s /usr/local/bin/perl /usr/opt/perl5/bin/perl fi } mkgrp_usr() { if [ $# -ne 2 ] then debug 0 "Missing user-name parameter in mkgrp_usr" return 1 fi user="$1"; group="$2" # First create new group... if ! lsgroup $group >/dev/null then print "making group '$group'" if ! mkgroup $group then print "Can't make group '$group'" print "Stopping" exit 2 fi else print "Group $group exists" fi if ! lsuser $user >/dev/null then echo "making user $user" if ! mkuser account_locked=true gecos="Automatic account" \ pgrp=$group login=false rlogin=false su=false \ sugroups="" $user then echo "Can't create user '$user'" echo "Stopping" exit 2 fi else echo "User $user exists" fi } exit 0 196 11236 7490 1125991631 0 0 644 27 freeware.libgcrypt.rte.size` ./usr 4 ./usr/local 10 ./usr/local/bin 7 ./usr/local/lib 639 ./usr/local/include 133 ./usr/local/share 2 ./usr/local/share/aclocal 9 ./usr/local/info 410 ./usr/lpp 2 ./usr/lpp/freeware.libgcrypt 2981 14364 10898 1117485856 0 0 755 31 freeware.libgcrypt.rte.unpost_i` #!/usr/bin/ksh LANG=C VERBOSE=${VERBOSE:-"0"} # simple debug system appname="${0##*/}" # $(basename $0) # Pre- and Post install template scripts # Copyright (C) 2000 GROUPE BULL # all rights reserved. # # author: Ciaran Deignan (Ciaran.Deignan@bull.net) # started: July 1997, last modified July 2000 # version: 2.0 #------------------------------------------------------------------ # GLOBAL UTILITIES #------------------------------------------------------------------ # Debug message print function (v1.0 - July 1998) debug() { integer lev=$1 shift [ $VERBOSE -ge $lev ] && print -- "$@" >&2 return 0 } # error handler (v2.1 - July 1998): cmd() { debug 7 "CMD: execute '$@'" eval '"$@"' [ $? -ne 0 ] && debug 0 "$appname: CMD: error detected in '$@'" \ && print exit 2 } typeset -xf cmd debug [ $VERBOSE -gt 9 ] && set -x #------------------------------------------------------------------ debug 2 "$appname: starting execution, params <$*>"; # Function to update the file /usr/local/info/dir # This function should be used if the LPP delivers files into # /usr/local/info # NOTE: the file /usr/local/info/dir should *never* be delivered directly... update_info_dir() { if ! [ -d /usr/local/info ] then debug 1 "No info directory found !" debug 1 "stopping" return 0 fi if type gen-dir-node >/dev/null 2>&1 then print "Updating info \"root\" file (/usr/local/info/dir)" cmd cd /usr/local/info [ -f dir ] && cmd mv dir dir.bak cmd gen-dir-node /usr/local/info/ > dir cmd chmod 444 dir fi } # Perl module update function... remove_perllocal () { if [ $# -ne 1 ] then debug 0 "Missing module-name parameter in remove_perllocal" debug 0 "can't remove module info from perllocal." return 0 fi modulename="$1" if [ "$PERLLIB" = "" ] || [ ! -d "$PERLLIB" ] then print "remove_perllocal: PERLLIB not defined (=$PERLLIB)" return 0 fi archdir=${archdir:-"aix"} # the directory /usr/local/lib/perl5/ ($PERLLIB) should exist, or might # be a symbolic link to /usr/opt/perl5/lib.... if ! cd $PERLLIB/. then print "Perl not installed correctly, can't find directory" print "$PERLLIB" exit 1 fi if ! ls */$archdir/perllocal.pod > /dev/null 2>&1 then filename=$(ls -td 5.*/$archdir | line) if [ "$filename" = "" ] then cmd print "Perl not installed correctly, can't find \c" cmd print "directory $PERLLIB/5.00*/$archdir" exit 3 fi filename="$filename/perllocal.pod" else filename=$(cmd ls -t */$archdir/perllocal.pod | line) fi # use a small perl script to remove the module info # (I hope this isn't too "wildcard"...) cmd perl -w -n -i.bak -e ' $line = $_; if (defined ($flag) && ($flag == 2)) { undef $flag ;} $flag=1 if $line =~ /^=head2\s+.*L<'"$modulename"'>/; print $line if !defined($flag); $flag=2 if $line =~ /^=back/;' $filename } #PERLLIB=/usr/local/lib/perl5/ #PERLLIB=/usr/opt/perl5/lib/ #archdir=ia64-aix exit 0 371 0 11236 0 0 0 0 0 ` 7 128 648 2098 4734 7490 10898 11236 freeware.libgcrypt.rte.alfreeware.libgcrypt.rte.copyrightfreeware.libgcrypt.rte.inventoryfreeware.libgcrypt.rte.post_ifreeware.libgcrypt.rte.pre_ifreeware.libgcrypt.rte.sizefreeware.libgcrypt.rte.unpost_iroups= k5eDC {B {B65e./errfilefreewablpp_name sequence error - found ] with sequence = 3 lpp_name sequence error - exit with sequence = 3 cti kꂕ DCqyBqyB6 ./usr/local/bin/libgcrypt-configpp.ab#!/bin/sh # Copyright (C) 1999, 2002, 2003, 2004 Free Software Foundation, Inc. # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This file is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # General. prefix="/internet/pa/libgcrypt-1.2.1/usr/local" exec_prefix="${prefix}" version="1.2.1" includedir="${prefix}/include" libdir="${exec_prefix}/lib" gpg_error_libs="-L/internet/pa/libgpg-error-1.0/usr/local/lib -lgpg-error" gpg_error_cflags="-I/internet/pa/libgpg-error-1.0/usr/local/include" # libgcrypt values. libs="-lgcrypt" cflags="" # API info api_version="1" # Misc information. symmetric_ciphers="arcfour blowfish cast5 des aes twofish serpent rfc2268" asymmetric_ciphers="dsa elgamal rsa" digests="crc md4 md5 rmd160 sha1 sha256 sha512 tiger" # State variables. echo_libs=no echo_cflags=no echo_prefix=no echo_algorithms=no echo_exec_prefix=no echo_version=no echo_api_version=no # Prints usage information. usage() { cat <&2 fi while test $# -gt 0; do case "$1" in # Set up `optarg'. --*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg="" ;; esac case $1 in --thread=*) echo "$0: --thread option obsolete: use the thread callback interface" 1>&2 # exit 1 <-- enable this for 1.2.0. ;; --prefix=*) # For compatibility reasons with old M4 macros, we ignore # setting of prefix. ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo_version=yes ;; --api-version) echo_api_version=yes ;; --cflags) echo_cflags=yes ;; --libs) echo_libs=yes ;; --algorithms) echo_algorithms=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo "$prefix" fi if test "$echo_exec_prefix" = "yes"; then echo "$exec_prefix" fi if test "$echo_cflags" = "yes"; then includes="" cflags_final="$cflags" # Set up `includes'. if test "x$includedir" != "x/usr/include" -a "x$includedir" != "x/include"; then includes="-I$includedir" fi # Set up `cflags_final'. cflags_final="$cflags_final $gpg_error_cflags" echo "$includes $cflags_final" fi if test "$echo_libs" = "yes"; then libdirs="" libs_final="$libs" # Set up `libdirs'. if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then libdirs="-L$libdir" fi # Set up `libs_final'. libs_final="$libs_final $gpg_error_libs" echo "$libdirs $libs_final" fi if test "$echo_version" = "yes"; then echo "$version" fi if test "$echo_api_version" = "yes"; then echo "$api_version" fi if test "$echo_algorithms" = "yes"; then echo "Symmetric cipher algorithms: $symmetric_ciphers" echo "Public-key cipher algorithms: $asymmetric_ciphers" echo "Message digest algorithms: $digests" fi k nDCsyBsyB6 n./usr/local/lib/libgcrypt.anfigb 317934 318104 0 158 158 0 317645 317934 0 1117458208 5868 10000 755 15 libgcrypt.so.11` B rH0 P TRE.textPPP5  .data m@.bss  .loader,}.debugY> A L| N A L| N A L| N  A L| N A L| N A L| N A L| N A L| N  A L| N $A L| N |!KeA8!8|N A$ strtoimax|!KIA8!8|N A$strtold!"(8!iN @gcry_set_gettext_handler|"(|`x!ȁ), @8!8|x|N A| iIN!A|`xK AX _gcry_gettext!b,8!"0kN @gcry_set_fatalerror_handler||}x!KAx|ex8`K)A8!H|N AD write2stderr,||~x|#x!Ad",I, @$b4KaxKYb8KQKŀA"0xx iA| jJN!AKKA|xK A_gcry_fatal_error!b<8!"@iN @gcry_set_log_handler!"D8!iN @_gcry_set_log_verbosity"D9`! |@9`}c[x8!N @(_gcry_log_verbosity}&|"@|+x|#x|x!I, @,.(A0A, A$Al,A\HxbLKYAbLxxKmAA,2A8!H|} N .(K,.(K,2APA(.(@L88bPK%AK|,d.(@\.(L8bT8K.(L8bX8 K"<|#x.( |dxxiA| jJN!AK8`KɀAKA C _gcry_logv|!ȐX8X\`d!hAlK58!8|N A< _gcry_log||#x\|+x|ex!8`2KKQA A, _gcry_bug|!ȐT|dx8` X8T\`d!hAlK8!8|N AH_gcry_log_info|!ȐT|dx8`X8T\`d!hAlK8!8|N AH_gcry_log_error|!ȐT|dx8`(X8T\`d!hAlKKA A@_gcry_log_fatal|!ȐT|dx8`2X8T\`d!hAlK=KA A@ _gcry_log_bug|!ȐT|dx8`dX8T\`d!hAlK8!8|N AH_gcry_log_debug,|!ȐT|dx8`X8T\`d!hAlAKa8!8|N AP_gcry_log_printf9`@|}i8!9!8 9)B4c@K8!x|N AD_gcry_burn_stack!|? xb`"`)8  !N `,_GLOBAL__FI_libgcrypt_so!|? x!N `_GLOBAL__FD_libgcrypt_so|!|? xKQ!|N a, _GLOBAL__DI|!|? xK]!|N a, _GLOBAL__DD|!KMA8!8|N A$ strtoimax|"d8`! ,A8h?, @W>,9@}cA$9C8U8# 8!H}CSx|N HA|jxK A_gcry_private_malloc,||x9@!A\"9c ,A`}c[xHY`W>W>,9@}cA$9C8̘8# 8!H}CSx|N H`|jxK A_gcry_private_malloc_secure|"|#x|~x! ,A,AHA`x>U)@.TKxx|@@`,AtxK,||x8`A<xxxK`|P||8Hq`xH`x8!H|N xKAK8!H|#x|KLHm`,AxxHu`KxxH!AK| AP_gcry_private_realloc|"|dx/!Ȁ ,APALciii`U|})}*9}e[xAL#cT@.})xUk})[x|H,@8!8|N T>b0Ka`b4Ue>K A_gcry_private_check_heap[DS],||x!A0" ,@DH `,xA H `8!H|N xHAKKxH `8,|x@|xK A_gcry_private_free[DS]A L| N |!KрA8!8|N A$ strtoimax|!KߵA8!8|N A$strtold,!/A$bB *|9) *A$Bb* 9)|P* 8!N @\ stats_update!#8!Bb|cJ 8c+|P| ||c8N @8 mb_get_next|"|~x;!)|HA }?KxxKq|A |xK8!Hx|N Ad mb_get_prev||~x!Ka|xxK,/A(p @x?})9)?A$p @>})9)>8!H|N Amb_merge||#x|x!B*|P|H@@Dxp @?| @@\K|xB*|P|H@AĀ8!H*|P| |8x|N |HP`(@}?88i cKuBK A mb_get_new|"Đ!Ȁ ,A8!8|N bKa`Ku`K AD print_warn||#x|x!H A,||x&A"8;  @,Ad"Ё i i 0 }@Y1i| I}I9A0,mA(, A xH MA|dxbK`"8 8!H|N H 1A,@lxH EA,@ H A|}xH A|A$"ЀiH A|dxbK`8`H A,AKxxH A,|xA"Ё), A}?KxK A lock_pool|"! ,@H A?88|`x}c})99)8})X88`}$Kx?H A8,bkA" ,A8bk8!H8" I|KN ~KMA,bkAH8K"ЀiH 5A|exbK`KlbK`b KA` AH init_pool||}xb!K`WWb/"Ā ,KA@"܀ ,@$bKe`8!H|N IKK A_gcry_secmem_set_flags|b!K!`"bāI 1*| QbT<1(AxK`8!Hx|N Ah_gcry_secmem_get_flags||}xb!K`,Ah(?A;@" ,@<xK x"iKUbK!`8!H|N bK`Kԁ"8 HрA|}xHA|AxH)A,@ HA|}xHA|AbK`8`HA,AKX A_gcry_secmem_init|"|~x! ,Ab܀ ,A"), AX"8T4ixK88,|xxA K88!H|x|N +K}Kb K`K`8`KA A_gcry_secmem_malloc_internal||}xb!Ka`xK|}xbK%`8!Hx|N AP_gcry_secmem_malloc,|8;|x!AxH`8xxH`8UxxH`8xxHy`8`xK8!HxT<|K<8!H|N A_gcry_secmem_free_internal||}xb!K`xKbK`8!H|N AH_gcry_secmem_free|||xb|#xx!Ke`x|@@4bK%`8!Hx|N Kxx,|~xAK`|~|P8H`xKK A_gcry_secmem_realloc||~xb;!K`" ,A(bB+ })P9)| @@;bK-`8!Hx|N A_gcry_private_is_secure|b!Ȁ ,Ab#,A| 8 9)B#,A| 8 9)B#,A| 8U 9)B#,A| 8 9)B" ,@$8 8!8|N cHAbbK A_gcry_secmem_term|b!K`" ,@ bK`8!8|N "bBb(K`K Al_gcry_secmem_dump_stats̐A L| N ԐA L| N A L| N A L| N A L| N A L| N A L| N H @memset$A L| N ,A L| N 8A L| N @N @strcpy`A L| N dA L| N hA L| N lA L| N |!K=A8!8|N A$ strtoimax|!K!A8!8|N A$strtold|"p!Ȁ ,A8!8|N 8 Ky`,At8NbxKѝ`KAKAK=AK At global_init||#x;|x!c,0AhK A,A ?}>J;K,xA(|`x8!H|x|N 8`K؈K⡀A8,@ĈK Aparse_version_number||3x|+x!K9 ,Ax8c,.A 8!H}#Kx|N K9 ,A؈x8c,.@K9 ,A|ixK Aparse_version_string|||~x!Kx,A888<8@K|}x8`,Al8Dx8H8LK|dx8`,AHA8aD| XAx@!<H| AdAh| X@d K"pK8`=,K8`KAKK1AKKMAKx"pKi`K8`KAKEAKH A gcry_control|!K=A8!8|N A$ gcry_strerror|!KA8!8|N A$gcry_strsource|!KɀA8!8|N A$gcry_err_code_from_errno|!KuA8!8|N A$gcry_err_code_to_errno||}x|#xW!KA,Tc>x@8`8!H|N ALgcry_err_make_from_errno|!KA,Tc>dc @8`8!8|N A8gcry_error_from_errno|!|#xA|zxa|;x|3x|+x!Ky8!X"bBI+|g!Aa상N Agcry_set_allocation_handler|||x|#x!K8!H"b|N AHgcry_set_outofcore_handler||kx|+xp;!A" ,@x"), A\ | AiIN!A,A$~8!Hx|N 8` KA|xKKܹ`K"), A }c[x| K}c[xK۽`K A _gcry_malloc|88!888Ka88!@|N A4 gcry_malloc|88!888Ka88!@|N A4gcry_malloc_secure|"9`!Ȁ ,@ "), @$K`|kx8!8}c[x|N A| iIN!AK Apgcry_is_secure!8!N @ _gcry_check_heap|"!ȁ), A0 A| iIN!A8!8|N Ki`K AT gcry_realloc,|!A0"), A0 A| iIN!A8!8|N K5`K A\ gcry_free,|!֓!A|#9`|@HxK]8x,|~xA K`x8!H}c[x|N "8 K A gcry_calloc,|!֓!A|#9`|@HxK 8x,|~xA K`x8!H}c[x|N "8 K Agcry_calloc_secure||x!KA|}xxK8,|xA, AP A| iIN!A,@H$8!H|N |K]A|}xbK`|dxxK` Agcry_xmalloc_secure|!֐!xK18x||xK `8!Hx|N AP gcry_xcalloc|!֐!xK}8x||xK`8!Hx|N APgcry_xcalloc_securea|bЃ|x!xK,|}x@xK=A|}xxKUx<0, xA, ~A| iIN!A,@{KuA8,|x@xK`bK`|dxKxKe`8!Xxa|N A gcry_xstrdup"|`x!i8!|c8N @_gcry_get_debug_flag||#x|}x!K굀AxxK̀AxxKAxxKA8!H|N Algcry_set_progress_handlerA L| N A L| N A L| N A L| N A L| N ĐA L| N ȐA L| N ̐A L| N АA L| N ԐA L| N ؐA L| N |!KYA8!8|N A$ strtoimax|!K=A8!8|N A$strtold,||+x|#x|x!AHp@XT>KA,@|A8bK`7;@8!H|N , Ad, AT, AD, A4,A$,@bK`KbKbKbKbK؀bKЀbKȈK A dump_string,|;!A|x,A<,;AA,A<W| Pb W})K Agcry_sexp_release[DS]|8'b!K` A gcry_sexp_cons| 85b!KE` A gcry_sexp_alist|b!ȐX$T8A\`d!hAlK` A<gcry_sexp_vlist|(8Ob!K` A gcry_sexp_append|,8Xb!KQ` A gcry_sexp_prepend,||#x|}x8`|+x!A@,AX,A(,A\,A8;,@8`8!P|N =;!88Kx,@xx8;8x|@K%A,@8;,/At/Ad,ATA,;@|P8a88cK`8x|}xK`8xKK ;K;K8!8}=J;K|#xKA|xK08bKq` Agcry_sexp_find_token,|ix!9@9`8`AL }#Kx,A8,// 8cAHh! | A }`XP,@}CSx8! N i` | 9k| xKԠ!}#J8i@9JK @gcry_sexp_length/|;!A,} &!}*J9I}CSx8!N 8(ATi>}*J9IK8(ATi>}*J9IK8 (AU)%69IK8 (AU)%69IKt @ hextobyte|T<|x!C}CSxP}>"}hZ9)9k| @@}d[x@8!H|N KM`|K A make_space|#y!9 |+xA , ẢC8 (nAtb8T:}+.})Z})N XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(XXXXXXXX0XXXXXXX8XXX@XHXPX889 58c@|e8P8!N (@, @8c9K(@, K8"K8'K8\K8 K8 K8 K|8 Kt8 Kl(@l8 }KSx(A\#8 }*Kx(AH8(A8UixU@>})8cU)89}&J9)P'K (@c8 9+ 8|!)9 })I| Ky@8 (AЉc8 9+ 8|!)9 })I| Ky@8 (A|;x98(9T 69i@(F9i@9i(9}+9)@(F}+9)@ }+9)8c9*K,,\A8K9 K @unquote_string,|9|nx9:!: A}2Kxa:`:}Cx::|+x!; A;@a|#x|3x! !A h18| ;1~}+<| H9AxKݕ`,@ $a!)9 })I !8|}(y@,A@9+8 !)})I}) ||}(99K+ A Ud>AT7;@,A<89)( A88!H|x|N bPK9A|hp}x|@P|p8KbTKA8,@4K A<suitable_encoding,|||x|#x!A$;8#| @;A48#8!HW<8c|N |x;X;KՀA|@AK Aconvert_to_hex,||+x|}x|#x!A,8";A]8 (TAb\T:}+.})Z})N TD8\9 b?;7;@h8";||P8!H|N 8\9 tK8\9 nK8\9 vK8\9 fK8\9 rK8\9 "Kt8\9 'Kh8 !*9 })IT>}ESx !8|}+y@ _K<x;KAK(8\K,8`A(|=, "AAX8 (A8c;BK8 !)9 })IT> !8|}+yA 8cK8cK, 'A, \@K AHconvert_to_string,||#x|`x!|x|+xxA Kq`8!Hx|N ALconvert_to_token}&||~y|#x|+x!|3xa;`;ؓA蓁!pAhx,AP: T>,AA,,@D,8;A8;@.`xK AxKA!8|cJA<|@8`@xxKҝA8x|xK1`!8J}~H, }`[x@X,A$;A|@8`@,8 ;Ad|@8`@8x8!} |} } !Aa상N ;K8xKE-||xA,A8x8K.|zxMA0|@8`@dAl,AP8xxKI!8|H,A;A|@8`@ 8 ;!8K8xxK-K8xxKK8x8KKP8x8KK<,@.;;A|@8`@8);~;{i`}+|}*9@ ,A;A |@8`@P,;@i8 ;B~K/;A0.;AL|@8`@A0,A ;,@i8 ;B8(;~;{K\.K`dKh8ibKi` C gcry_sexp_sprint,8;9a|+x8!AP,A@,9 A,(A0< `̐8!@}#Kxa상N ? ? ?` 0}!/ccc{|@8|}9@,A|c, :A8' 8 ( })Z8A8c9K9 KdA0|:| @@|c:|x8K9 K4|:K܉c, (}i[xA, )A, [A, ]At8 ( A$, 08@p< 9 `Ki \!`| i)&!i}+I}+y@9 fK< 9 `K,A ;K< 9 `Kl,@ |~xK< 9 `KH,A,@49(@K,< 9 `K,8AK< 9 `K8K;K @gcry_sexp_canon_len[DS]|!KIA8!8|N A$ strtoimax!99@9`X/|ixA4 | A0), @| @@@d}CSx8!N 9@?K, A9k|ixA | A), @K, A9k|ixA | A), @K, A|9k|ixAp | A), @KT, AL9k|ixA8 | A), @K$, A9k| @@AK ,K,K,Kx,K@,K @T_gcry_module_id_new}&|a,|3x|+x|}x;!tA.A48!Xx|a상} N 8`K`,|xAP@8=, t A,AxKp"ЀiKA|~x.Kc8tK}|~xK8 C_gcry_module_add|!ȁc #, AiK`8!8|N A@_gcry_module_drop|cy!A| Ac,@8!N #9)#K @<_gcry_module_lookup_id||y|#x|+x!A<xA^| ~N!A,@0,@8!Hx|N ?9)?K A_gcry_module_lookup,!A#9), #A 8!8N 8!8KH @0_gcry_module_release#!9)8!#N @_gcry_module_use|ky!9Ak9, @,AL|@|x9@|kx| @@$} +U@:9Jk}$.B|@8`8!N @_gcry_module_list Fatal error: [Unknown log level %d]: Fatal: DBG: Ohhhh jeeee: ... this is a bug (%s:%d:%s) __EXath.cWarning: using insecure memory! can't lock memory: %s failed to reset uid: %s can't mmap pool of %u bytes: %s - using malloc secure memory is disabledcan't allocate memory pool of %u bytes Oops, secure memory pool already initialized failed to drop setuid operation is not possible without initialized secure memory secmem usage: %u/%lu bytes in %u blocks memory at %p corrupted (overflow=%02x) memory at %p corrupted (underflow=%02x) global_initglobal.c1.2.1out of core in secure memory%c\0\x%02x\b\v\f\r\n%*s[unknown tag %d] %*s[data=""] %*s[close] %*s[open] [nil] gcry_sexp_conssexp.cgcry_sexp_alistgcry_sexp_vlistgcry_sexp_appendgcry_sexp_prependgcry_sexp_find_tokengcry_sexp_nthabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-./_:*+=%dsexp_sscan&\ "'\-./_:*+=%02X%u:gcry_sexp_sprint( (@ 4Y_GLOBAL__FI_libgcrypt_so_GLOBAL__FD_libgcrypt_soh T T( T T T T( T T| T T 4 T T T p T T X T T  T ` T T < TX T0 T) T/x T)@ T( T Tl T T. T@ T T8 T: T< T= T=` T= T> T> T> T? T@ TA TAl TA TB\ TB TC TC TD, TD TEx TFP TG8 TH, TH TI TJP TJ TN TP\ TQ TR TR TS TSh TS TT TT\ TV@ TW TY TYP TZl T[ T]` Tq TrD Tr TyD T}D T+ T- T-t T Tt TP T T` T T T T T, T T, T Tp T, T Tt T T T      @    @8  @ D  $ 8Hl 4 0 ( , H <D\ t ,8:X X P T l \ ` d h L p@`dhptx|0H_dXu o! !__rtinit @@errno@mmap@ munmap@ setuid@ naccept@ nsendmsg@ nrecvmsg@ @_iob@malloc@ realloc@ free@ exit@ strlen@ strchr@ fprintf@ 3@ write@ abort@ atoi@ isdigit@ vfprintf@ sprintf@ fwrite@ read@ strtod@ select@ isspace@ getuid@ waitpid@ geteuid@ memcmp@ isxdigit@ __assert@ iscntrl@ strerror@ connect@ mlock@ stpcpy@ A@ P@ `@ o@  h t       -  9  E  V  h  z         (  4  @  L  X % d D p ^ | r                3  H  ]  l  |   $  0  <  H  T  ` / l > x L  a  r                      +  : , Q 8 m D ~ P  \  h  t           (  ;  K  [  p           (  4  @  L  X 7 d K p f | }                -  G  X  j   }   $  0  <  H @ @ @ @ .@ J@ d@ }@ @ @ @ @ @ 8@ Y@ i@ z@ A B h l t x                             ( , 4 8 @ D L P X \ d h p t |                            $ ( 0 4 < @ H L T X ` d l p x |                            $ , 0 8 < D H P T \ ` h l t x                              ( , 4 8 @ D L P X \ d h p t |                             $ ( 0 4 < @ H L T- X \ ` d h/ l p t x |                    '    #   *                     " $ () , 0 4$ 8  < @+ D H L P T X \ ` d h l p t x |            . 0                     ( %   &      $ (! ,, 0 4 8 < @ D H L P T X \ ` d h l p t x |                /internet/pa/libgpg-error-1.0/usr/local/lib:/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2:/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/../../..:/usr/lib:/liblibc.ashr.olibgpg-error.alibgpg-error.so.0 ___memset ___memmove_system_configuration getpagesize __strtollmaxgpg_strsource gpg_strerrorgpg_err_code_from_errnogcry_set_gettext_handler_gcry_gettextgcry_set_fatalerror_handler_gcry_fatal_errorgcry_set_log_handler_gcry_set_log_verbosity_gcry_log_verbosity _gcry_log _gcry_bug_gcry_log_info_gcry_log_error_gcry_log_fatal_gcry_log_bug_gcry_log_debug_gcry_log_printf_gcry_burn_stack_GLOBAL__FI_libgcrypt_so_GLOBAL__FD_libgcrypt_so _GLOBAL__DI _GLOBAL__DD_gcry_ath_init_gcry_private_enable_m_guard_gcry_secmem_dump_stats_gcry_secmem_init_gcry_secmem_term_gcry_secmem_get_flags_gcry_secmem_set_flags_gcry_ath_install_gcry_private_malloc_secure_gcry_private_malloc_gcry_private_is_secure_gcry_private_realloc_gcry_private_freegcry_check_version gcry_controlgcry_strerrorgcry_strsourcegcry_err_code_from_errnogcry_err_code_to_errnogcry_err_make_from_errnogcry_error_from_errnogcry_set_allocation_handlergcry_set_outofcore_handler _gcry_malloc gcry_mallocgcry_malloc_securegcry_is_secure_gcry_check_heap gcry_realloc gcry_free gcry_callocgcry_calloc_secure gcry_strdup gcry_xmallocgcry_xreallocgcry_xmalloc_secure gcry_xcallocgcry_xcalloc_secure gcry_xstrdup_gcry_get_debug_flaggcry_set_progress_handlergcry_sexp_dumpgcry_sexp_creategcry_sexp_newgcry_sexp_releasegcry_sexp_consgcry_sexp_alistgcry_sexp_vlistgcry_sexp_appendgcry_sexp_prependgcry_sexp_find_tokengcry_sexp_lengthgcry_sexp_nthgcry_sexp_cargcry_sexp_nth_datagcry_sexp_nth_mpigcry_sexp_cdrgcry_sexp_cadrgcry_sexp_buildgcry_sexp_build_arraygcry_sexp_sscangcry_sexp_sprintgcry_sexp_canon_len_gcry_secmem_malloc_gcry_secmem_realloc_gcry_secmem_free_gcry_private_check_heap_gcry_ath_mutex_lock_gcry_ath_mutex_unlock_gcry_module_add_gcry_module_lookup_id_gcry_module_lookup_gcry_module_release_gcry_module_use_gcry_module_list_gcry_ath_mutex_init_gcry_ath_mutex_destroy_gcry_ath_read_gcry_ath_write_gcry_ath_select_gcry_ath_waitpid_gcry_ath_accept_gcry_ath_connect_gcry_ath_sendmsg_gcry_ath_recvmsg_gcry_cipher_init_gcry_md_init_gcry_pk_init_gcry_random_dump_stats_gcry_secure_random_alloc_gcry_random_initialize_gcry_quick_random_gen_gcry_set_random_seed_file_gcry_update_random_seed_file_gcry_fast_random_poll_gcry_register_pk_dsa_progress_gcry_register_pk_elg_progress!_gcry_register_primegen_progress_gcry_register_random_progressgcry_mpi_scangcry_mpi_printgcry_mpi_get_flagT__int128_t:t1=@s128;r1;000000000000000000000000;0377777777777777777777777777777777;U__uint128_t:t2=@s128;r2;000000000000000000000000;0377777777777777777777777777777777;.complex int:t3=s8real:-1,0,32;imag:-1,32,32;;complex float:t4=R3;8;0;complex double:t5=R4;16;0; complex long double:t6=R4;16;0;__builtin_va_list:t7=*-2_Bool:t8=@s8;-16;__gnuc_va_list:t9=7size_t:t10=-10fpos_t:t11=-4fpos64_t:t12=-31FILE:t13=14=s32_ptr:15=*-5,0,32;_cnt:-1,32,32;_base:15,64,32;_bufendp:15,96,32;_flag:-3,128,16;_file:-3,144,16;__stdioid:-1,160,32;__newbase:16=*-2,192,32;_lock:17=*-11,224,32;;va_list:t18=16int8_t:t19=-6int16_t:t20=-3int32_t:t21=-1int64_t:t22=-31uint8_t:t23=-5uint16_t:t24=-7uint32_t:t25=-8uint64_t:t26=-32intmax_t:t27=22uintmax_t:t28=26intptr_t:t29=-4uintptr_t:t30=-10int_least8_t:t31=-6int_least16_t:t32=-3int_least32_t:t33=-1int_least64_t:t34=-31uint_least8_t:t35=-5uint_least16_t:t36=-7uint_least32_t:t37=-8uint_least64_t:t38=-32int_fast8_t:t39=-6int_fast16_t:t40=20int_fast32_t:t41=21uint_fast8_t:t42=-5uint_fast16_t:t43=24uint_fast32_t:t44=25int_fast64_t:t45=22uint_fast64_t:t46=260imaxdiv_t:t47=48=s16quot:27,0,64;rem:27,64,64;;strtoimax:f27nptr:R49=*50=k-2endptr:R51=*16wchar_t:t52=-7intfast_t:t53=21uintfast_t:t54=25__long32_t:t55=-4__ulong32_t:t56=-10__long64_t:t57=-1__ulong64_t:t58=-8int32long64_t:t59=-1uint32long64_t:t60=-8long32int64_t:t61=-4ulong32int64_t:t62=-10 int8:t63=-6 int16:t64=-3 int32:t65=-1int64:t66=-31u_int8:t67=-5u_int8_t:t68=-5u_int16:t69=-7u_int16_t:t70=-7u_int32:t71=-8u_int32_t:t72=-8u_int64:t73=-32u_int64_t:t74=-32ptrdiff_t:t75=-4wctype_t:t76=-8time_t:t77=-1clock_t:t78=-1uchar_t:t79=-5ushort_t:t80=-7uint_t:t81=-8ulong_t:t82=-10ssize_t:t83=-4level_t:t84=-1daddr_t:t85=57daddr32_t:t86=-1daddr64_t:t87=22caddr_t:t88=16 ino_t:t89=58ino32_t:t90=81ino64_t:t91=26 cnt_t:t92=-3 dev_t:t93=58dev32_t:t94=81dev64_t:t95=26chan_t:t96=-1time32_t:t97=-1pid32_t:t98=-1tid32_t:t99=-1pid64_t:t100=26tid64_t:t101=26time64_t:t102=26__ptr32:t103=17__cptr32:t104=16soff_t:t105=-1off_t:t106=-4off64_t:t107=-31paddr_t:t108=-4key_t:t109=59timer_t:t110=57timer32_t:t111=-1timer64_t:t112=22nlink_t:t113=-3mode_t:t114=81uid_t:t115=81gid_t:t116=81mid_t:t117=103pid_t:t118=59tid_t:t119=57Vslab_t:t120=121=ar122=r122;000000000000000000000000;000000000000037777777777;;0;11;-2mtyp_t:t123=-4boolean_t:t124=-1crid_t:t125=-1blkcnt_t:t126=57blksize_t:t127=57blkcnt32_t:t128=-1blksize32_t:t129=-1blkcnt64_t:t130=26blksize64_t:t131=26fsblkcnt_t:t132=82fsfilcnt_t:t133=82wint_t:t134=-1 id_t:t135=60useconds_t:t136=-8suseconds_t:t137=-1clockid_t:t138=-11sigset_t:T139=s8losigs:-8,0,32;hisigs:-8,32,32;;sigset_t:t140=1397sigset32_t:t141=142=s8losigs:-8,0,32;hisigs:-8,32,32;;7sigset64_t:t143=144=s32ss_set:145=ar122;0;3;26,0,256;;signal_t:t146=-1*fsid_t:T147=s8val:148=ar122;0;1;-8,0,64;;fsid_t:t149=147.fsid64_t:T150=s16val:151=ar122;0;1;26,0,128;;fsid64_t:t152=150pthread_attr_t:t153=17pthread_condattr_t:t154=17pthread_mutexattr_t:t155=17pthread_rwlockattr_t:t156=17pthread_t:t157=-8pthread_key_t:t158=-8@pthread_mutex_t:t159=160=s52__mt_word:161=ar122;0;12;-1,0,416;;?pthread_cond_t:t162=163=s44__cv_word:164=ar122;0;10;-1,0,352;;@pthread_once_t:t165=166=s112__on_word:167=ar122;0;27;-1,0,896;;Cpthread_rwlock_t:t168=169=s208__rw_word:170=ar122;0;51;-1,0,1664;;)_quad:T171=s8val:172=ar122;0;1;-1,0,64;;quad:t173=171vmid_t:t174=-4vmhandle_t:t175=82vmid32_t:t176=-1vmhandle32_t:t177=81kvmid_t:t178=61kvmhandle_t:t179=62vmid64_t:t180=-31rpn64_t:t181=-31cnt64_t:t182=-31vmidx_t:t183=59vmkey_t:t184=59vmhwkey_t:t185=59vpn_t:t186=59rpn_t:t187=59ptex_t:t188=-10swhatx_t:t189=-10esid_t:t190=60aptx_t:t191=80pdtx_t:t192=-1unidx_t:t193=-1snidx_t:t194=-1vmnodeidx_t:t195=-1kvpn_t:t196=-1krpn_t:t197=-1vmsize_t:t198=59vmm_lock_t:t199=59ureg_t:t200=-101vmaddr_t:T201=s8srval:175,0,32;offset:88,32,32;;vmaddr_t:t202=201Badspace_t:T203=s68alloc:62,0,32;srval:204=ar122;0;15;175,32,512;;adspace_t:t205=203+_MR_ATTR_TYPE:T206=eBadAttr:0,VirtAddr:1,;MR_ATTR_TYPE:t207=206i_MR_LABEL_TYPE:T208=eBadMem:0,FreeMem:1,IPLCB:2,RMALLOC:3,PM_HEAP:4,RTAS_HEAP:5,TCE_TABLE:6,IO_SPACE:7,;MR_LABEL_TYPE:t209=208iplcb_map_reg_t:t210=211=s24mr_addr:-32,0,64;mr_size:-32,64,64;mr_att:-5,128,8;mr_label:-5,136,8;mr_nodeid:-7,144,16;reserved:212=ar122;0;3;-2,160,32;;vmlpghandle_t:t213=175label_t:T214=s100prev:215=*214,0,32;iar:82,32,32;stack:82,64,32;toc:82,96,32;cr:82,128,32;intpri:82,160,32;reg:216=ar122;0;18;82,192,608;;label_t:t217=214ext_t:t218=59__ptr64:t219=-32__cptr64:t220=-32UniChar:t221=80UTF32Char:t222=81uchar:t223=79ushort:t224=80 uint:t225=81ulong:t226=824physadr_t:t227=228=*229=s4r:230=ar122;0;0;-1,0,32;;physadr:t231=227u_char:t232=-5u_short:t233=-7u_int:t234=-8u_long:t235=-10swblk_t:t236=-1/sigset:T237=s8losigs:-8,0,32;hisigs:-8,32,32;;fsid:T238=s8val:148,0,64;;`fileid:T239=s24fid_len:81,0,32;fid_ino:90,32,32;fid_gen:81,64,32;fid_x:240=ar122;0;9;-2,96,80;;@fid:T241=s24fid_len:81,0,32;fid_data:242=ar122;0;19;-2,32,160;;fid_t:t243=241,fhandle:T244=s32x:245=ar122;0;31;-2,0,256;;fhandle_t:t246=2448filehandle:T247=s32fh_fsid:149,0,64;fh_fid:239,64,192;;Ounique_id:T248=s16word1:56,0,32;word2:56,32,32;word3:56,64,32;word4:56,96,32;;unique_id_t:t249=248offset_t:t250=-31ssize64_t:t251=-31longlong_t:t252=-31u_longlong_t:t253=-32class_id_t:t254=-8size64_t:t255=-32)div_t:T256=s8quot:-1,0,32;rem:-1,32,32;;div_t:t257=256*ldiv_t:T258=s8quot:-4,0,32;rem:-4,32,32;;ldiv_t:t259=258.lldiv_t:T260=s16quot:-31,0,64;rem:-31,64,64;;lldiv_t:t261=260 strtold:f-142timeval:T262=s8tv_sec:77,0,32;tv_usec:137,32,32;;3timeval32:T263=s8tv_sec:21,0,32;tv_usec:21,32,32;;4timeval64:T264=s16tv_sec:22,0,64;tv_usec:21,64,32;;_LC_load_object_t:t449=450=s24hdr:328,0,96;handle:444,96,96;;stat:T451=s116st_dev:93,0,32;st_ino:89,32,32;st_mode:114,64,32;st_nlink:113,96,16;st_flag:80,112,16;st_uid:115,128,32;st_gid:116,160,32;st_rdev:93,192,32;st_size:106,224,32;st_atime:77,256,32;st_atime_n:-1,288,32;st_mtime:77,320,32;st_mtime_n:-1,352,32;st_ctime:77,384,32;st_ctime_n:-1,416,32;st_blksize:127,448,32;st_blocks:126,480,32;st_vfstype:-1,512,32;st_vfs:81,544,32;st_type:81,576,32;st_gen:81,608,32;st_reserved:452=ar122;0;8;81,640,288;;stat64:T453=s128st_dev:93,0,32;st_ino:89,32,32;st_mode:114,64,32;st_nlink:113,96,16;st_flag:80,112,16;st_uid:115,128,32;st_gid:116,160,32;st_rdev:93,192,32;st_ssize:105,224,32;st_atime:77,256,32;st_atime_n:-1,288,32;st_mtime:77,320,32;st_mtime_n:-1,352,32;st_ctime:77,384,32;st_ctime_n:-1,416,32;st_blksize:127,448,32;st_blocks:126,480,32;st_vfstype:-1,512,32;st_vfs:81,544,32;st_type:81,576,32;st_gen:81,608,32;st_reserved:454=ar122;0;9;81,640,320;st_size:107,960,64;; :T455=eGPG_ERR_SOURCE_UNKNOWN:0,GPG_ERR_SOURCE_GCRYPT:1,GPG_ERR_SOURCE_GPG:2,GPG_ERR_SOURCE_GPGSM:3,GPG_ERR_SOURCE_GPGAGENT:4,GPG_ERR_SOURCE_PINENTRY:5,GPG_ERR_SOURCE_SCD:6,GPG_ERR_SOURCE_GPGME:7,GPG_ERR_SOURCE_KEYBOX:8,GPG_ERR_SOURCE_KSBA:9,GPG_ERR_SOURCE_DIRMNGR:10,GPG_ERR_SOURCE_GSTI:11,GPG_ERR_SOURCE_USER_1:32,GPG_ERR_SOURCE_USER_2:33,GPG_ERR_SOURCE_USER_3:34,GPG_ERR_SOURCE_USER_4:35,GPG_ERR_SOURCE_DIM:256,;gpg_err_source_t:t456=455 :T457=eGPG_ERR_NO_ERROR:0,GPG_ERR_GENERAL:1,GPG_ERR_UNKNOWN_PACKET:2,GPG_ERR_UNKNOWN_VERSION:3,GPG_ERR_PUBKEY_ALGO:4,GPG_ERR_DIGEST_ALGO:5,GPG_ERR_BAD_PUBKEY:6,GPG_ERR_BAD_SECKEY:7,GPG_ERR_BAD_SIGNATURE:8,GPG_ERR_NO_PUBKEY:9,GPG_ERR_CHECKSUM:10,GPG_ERR_BAD_PASSPHRASE:11,GPG_ERR_CIPHER_ALGO:12,GPG_ERR_KEYRING_OPEN:13,GPG_ERR_INV_PACKET:14,GPG_ERR_INV_ARMOR:15,GPG_ERR_NO_USER_ID:16,GPG_ERR_NO_SECKEY:17,GPG_ERR_WRONG_SECKEY:18,GPG_ERR_BAD_KEY:19,GPG_ERR_COMPR_ALGO:20,GPG_ERR_NO_PRIME:21,GPG_ERR_NO_ENCODING_METHOD:22,GPG_ERR_NO_ENCRYPTION_SCHEME:23,GPG_ERR_NO_SIGNATURE_SCHEME:24,GPG_ERR_INV_ATTR:25,GPG_ERR_NO_VALUE:26,GPG_ERR_NOT_FOUND:27,GPG_ERR_VALUE_NOT_FOUND:28,GPG_ERR_SYNTAX:29,GPG_ERR_BAD_MPI:30,GPG_ERR_INV_PASSPHRASE:31,GPG_ERR_SIG_CLASS:32,GPG_ERR_RESOURCE_LIMIT:33,GPG_ERR_INV_KEYRING:34,GPG_ERR_TRUSTDB:35,GPG_ERR_BAD_CERT:36,GPG_ERR_INV_USER_ID:37,GPG_ERR_UNEXPECTED:38,GPG_ERR_TIME_CONFLICT:39,GPG_ERR_KEYSERVER:40,GPG_ERR_WRONG_PUBKEY_ALGO:41,GPG_ERR_TRIBUTE_TO_D_A:42,GPG_ERR_WEAK_KEY:43,GPG_ERR_INV_KEYLEN:44,GPG_ERR_INV_ARG:45,GPG_ERR_BAD_URI:46,GPG_ERR_INV_URI:47,GPG_ERR_NETWORK:48,GPG_ERR_UNKNOWN_HOST:49,GPG_ERR_SELFTEST_FAILED:50,GPG_ERR_NOT_ENCRYPTED:51,GPG_ERR_NOT_PROCESSED:52,GPG_ERR_UNUSABLE_PUBKEY:53,GPG_ERR_UNUSABLE_SECKEY:54,GPG_ERR_INV_VALUE:55,GPG_ERR_BAD_CERT_CHAIN:56,GPG_ERR_MISSING_CERT:57,GPG_ERR_NO_DATA:58,GPG_ERR_BUG:59,GPG_ERR_NOT_SUPPORTED:60,GPG_ERR_INV_OP:61,GPG_ERR_TIMEOUT:62,GPG_ERR_INTERNAL:63,GPG_ERR_EOF_GCRYPT:64,GPG_ERR_INV_OBJ:65,GPG_ERR_TOO_SHORT:66,GPG_ERR_TOO_LARGE:67,GPG_ERR_NO_OBJ:68,GPG_ERR_NOT_IMPLEMENTED:69,GPG_ERR_CONFLICT:70,GPG_ERR_INV_CIPHER_MODE:71,GPG_ERR_INV_FLAG:72,GPG_ERR_INV_HANDLE:73,GPG_ERR_TRUNCATED:74,GPG_ERR_INCOMPLETE_LINE:75,GPG_ERR_INV_RESPONSE:76,GPG_ERR_NO_AGENT:77,GPG_ERR_AGENT:78,GPG_ERR_INV_DATA:79,GPG_ERR_ASSUAN_SERVER_FAULT:80,GPG_ERR_ASSUAN:81,GPG_ERR_INV_SESSION_KEY:82,GPG_ERR_INV_SEXP:83,GPG_ERR_UNSUPPORTED_ALGORITHM:84,GPG_ERR_NO_PIN_ENTRY:85,GPG_ERR_PIN_ENTRY:86,GPG_ERR_BAD_PIN:87,GPG_ERR_INV_NAME:88,GPG_ERR_BAD_DATA:89,GPG_ERR_INV_PARAMETER:90,GPG_ERR_WRONG_CARD:91,GPG_ERR_NO_DIRMNGR:92,GPG_ERR_DIRMNGR:93,GPG_ERR_CERT_REVOKED:94,GPG_ERR_NO_CRL_KNOWN:95,GPG_ERR_CRL_TOO_OLD:96,GPG_ERR_LINE_TOO_LONG:97,GPG_ERR_NOT_TRUSTED:98,GPG_ERR_CANCELED:99,GPG_ERR_BAD_CA_CERT:100,GPG_ERR_CERT_EXPIRED:101,GPG_ERR_CERT_TOO_YOUNG:102,GPG_ERR_UNSUPPORTED_CERT:103,GPG_ERR_UNKNOWN_SEXP:104,GPG_ERR_UNSUPPORTED_PROTECTION:105,GPG_ERR_CORRUPTED_PROTECTION:106,GPG_ERR_AMBIGUOUS_NAME:107,GPG_ERR_CARD:108,GPG_ERR_CARD_RESET:109,GPG_ERR_CARD_REMOVED:110,GPG_ERR_INV_CARD:111,GPG_ERR_CARD_NOT_PRESENT:112,GPG_ERR_NO_PKCS15_APP:113,GPG_ERR_NOT_CONFIRMED:114,GPG_ERR_CONFIGURATION:115,GPG_ERR_NO_POLICY_MATCH:116,GPG_ERR_INV_INDEX:117,GPG_ERR_INV_ID:118,GPG_ERR_NO_SCDAEMON:119,GPG_ERR_SCDAEMON:120,GPG_ERR_UNSUPPORTED_PROTOCOL:121,GPG_ERR_BAD_PIN_METHOD:122,GPG_ERR_CARD_NOT_INITIALIZED:123,GPG_ERR_UNSUPPORTED_OPERATION:124,GPG_ERR_WRONG_KEY_USAGE:125,GPG_ERR_NOTHING_FOUND:126,GPG_ERR_WRONG_BLOB_TYPE:127,GPG_ERR_MISSING_VALUE:128,GPG_ERR_HARDWARE:129,GPG_ERR_PIN_BLOCKED:130,GPG_ERR_USE_CONDITIONS:131,GPG_ERR_PIN_NOT_SYNCED:132,GPG_ERR_INV_CRL:133,GPG_ERR_BAD_BER:134,GPG_ERR_INV_BER:135,GPG_ERR_ELEMENT_NOT_FOUND:136,GPG_ERR_IDENTIFIER_NOT_FOUND:137,GPG_ERR_INV_TAG:138,GPG_ERR_INV_LENGTH:139,GPG_ERR_INV_KEYINFO:140,GPG_ERR_UNEXPECTED_TAG:141,GPG_ERR_NOT_DER_ENCODED:142,GPG_ERR_NO_CMS_OBJ:143,GPG_ERR_INV_CMS_OBJ:144,GPG_ERR_UNKNOWN_CMS_OBJ:145,GPG_ERR_UNSUPPORTED_CMS_OBJ:146,GPG_ERR_UNSUPPORTED_ENCODING:147,GPG_ERR_UNSUPPORTED_CMS_VERSION:148,GPG_ERR_UNKNOWN_ALGORITHM:149,GPG_ERR_INV_ENGINE:150,GPG_ERR_PUBKEY_NOT_TRUSTED:151,GPG_ERR_DECRYPT_FAILED:152,GPG_ERR_KEY_EXPIRED:153,GPG_ERR_SIG_EXPIRED:154,GPG_ERR_ENCODING_PROBLEM:155,GPG_ERR_INV_STATE:156,GPG_ERR_DUP_VALUE:157,GPG_ERR_MISSING_ACTION:158,GPG_ERR_MODULE_NOT_FOUND:159,GPG_ERR_INV_OID_STRING:160,GPG_ERR_INV_TIME:161,GPG_ERR_INV_CRL_OBJ:162,GPG_ERR_UNSUPPORTED_CRL_VERSION:163,GPG_ERR_INV_CERT_OBJ:164,GPG_ERR_UNKNOWN_NAME:165,GPG_ERR_LOCALE_PROBLEM:166,GPG_ERR_NOT_LOCKED:167,GPG_ERR_PROTOCOL_VIOLATION:168,GPG_ERR_INV_MAC:169,GPG_ERR_INV_REQUEST:170,GPG_ERR_BUFFER_TOO_SHORT:200,GPG_ERR_SEXP_INV_LEN_SPEC:201,GPG_ERR_SEXP_STRING_TOO_LONG:202,GPG_ERR_SEXP_UNMATCHED_PAREN:203,GPG_ERR_SEXP_NOT_CANONICAL:204,GPG_ERR_SEXP_BAD_CHARACTER:205,GPG_ERR_SEXP_BAD_QUOTATION:206,GPG_ERR_SEXP_ZERO_PREFIX:207,GPG_ERR_SEXP_NESTED_DH:208,GPG_ERR_SEXP_UNMATCHED_DH:209,GPG_ERR_SEXP_UNEXPECTED_PUNC:210,GPG_ERR_SEXP_BAD_HEX_CHAR:211,GPG_ERR_SEXP_ODD_HEX_NUMBERS:212,GPG_ERR_SEXP_BAD_OCT_CHAR:213,GPG_ERR_USER_1:1024,GPG_ERR_USER_2:1025,GPG_ERR_USER_3:1026,GPG_ERR_USER_4:1027,GPG_ERR_USER_5:1028,GPG_ERR_USER_6:1029,GPG_ERR_USER_7:1030,GPG_ERR_USER_8:1031,GPG_ERR_USER_9:1032,GPG_ERR_USER_10:1033,GPG_ERR_USER_11:1034,GPG_ERR_USER_12:1035,GPG_ERR_USER_13:1036,GPG_ERR_USER_14:1037,GPG_ERR_USER_15:1038,GPG_ERR_USER_16:1039,GPG_ERR_UNKNOWN_ERRNO:16382,GPG_ERR_EOF:16383,GPG_ERR_E2BIG:32768,GPG_ERR_EACCES:32769,GPG_ERR_EADDRINUSE:32770,GPG_ERR_EADDRNOTAVAIL:32771,GPG_ERR_EADV:32772,GPG_ERR_EAFNOSUPPORT:32773,GPG_ERR_EAGAIN:32774,GPG_ERR_EALREADY:32775,GPG_ERR_EAUTH:32776,GPG_ERR_EBACKGROUND:32777,GPG_ERR_EBADE:32778,GPG_ERR_EBADF:32779,GPG_ERR_EBADFD:32780,GPG_ERR_EBADMSG:32781,GPG_ERR_EBADR:32782,GPG_ERR_EBADRPC:32783,GPG_ERR_EBADRQC:32784,GPG_ERR_EBADSLT:32785,GPG_ERR_EBFONT:32786,GPG_ERR_EBUSY:32787,GPG_ERR_ECANCELED:32788,GPG_ERR_ECHILD:32789,GPG_ERR_ECHRNG:32790,GPG_ERR_ECOMM:32791,GPG_ERR_ECONNABORTED:32792,GPG_ERR_ECONNREFUSED:32793,GPG_ERR_ECONNRESET:32794,GPG_ERR_ED:32795,GPG_ERR_EDEADLK:32796,GPG_ERR_EDEADLOCK:32797,GPG_ERR_EDESTADDRREQ:32798,GPG_ERR_EDIED:32799,GPG_ERR_EDOM:32800,GPG_ERR_EDOTDOT:32801,GPG_ERR_EDQUOT:32802,GPG_ERR_EEXIST:32803,GPG_ERR_EFAULT:32804,GPG_ERR_EFBIG:32805,GPG_ERR_EFTYPE:32806,GPG_ERR_EGRATUITOUS:32807,GPG_ERR_EGREGIOUS:32808,GPG_ERR_EHOSTDOWN:32809,GPG_ERR_EHOSTUNREACH:32810,GPG_ERR_EIDRM:32811,GPG_ERR_EIEIO:32812,GPG_ERR_EILSEQ:32813,GPG_ERR_EINPROGRESS:32814,GPG_ERR_EINTR:32815,GPG_ERR_EINVAL:32816,GPG_ERR_EIO:32817,GPG_ERR_EISCONN:32818,GPG_ERR_EISDIR:32819,GPG_ERR_EISNAM:32820,GPG_ERR_EL2HLT:32821,GPG_ERR_EL2NSYNC:32822,GPG_ERR_EL3HLT:32823,GPG_ERR_EL3RST:32824,GPG_ERR_ELIBACC:32825,GPG_ERR_ELIBBAD:32826,GPG_ERR_ELIBEXEC:32827,GPG_ERR_ELIBMAX:32828,GPG_ERR_ELIBSCN:32829,GPG_ERR_ELNRNG:32830,GPG_ERR_ELOOP:32831,GPG_ERR_EMEDIUMTYPE:32832,GPG_ERR_EMFILE:32833,GPG_ERR_EMLINK:32834,GPG_ERR_EMSGSIZE:32835,GPG_ERR_EMULTIHOP:32836,GPG_ERR_ENAMETOOLONG:32837,GPG_ERR_ENAVAIL:32838,GPG_ERR_ENEEDAUTH:32839,GPG_ERR_ENETDOWN:32840,GPG_ERR_ENETRESET:32841,GPG_ERR_ENETUNREACH:32842,GPG_ERR_ENFILE:32843,GPG_ERR_ENOANO:32844,GPG_ERR_ENOBUFS:32845,GPG_ERR_ENOCSI:32846,GPG_ERR_ENODATA:32847,GPG_ERR_ENODEV:32848,GPG_ERR_ENOENT:32849,GPG_ERR_ENOEXEC:32850,GPG_ERR_ENOLCK:32851,GPG_ERR_ENOLINK:32852,GPG_ERR_ENOMEDIUM:32853,GPG_ERR_ENOMEM:32854,GPG_ERR_ENOMSG:32855,GPG_ERR_ENONET:32856,GPG_ERR_ENOPKG:32857,GPG_ERR_ENOPROTOOPT:32858,GPG_ERR_ENOSPC:32859,GPG_ERR_ENOSR:32860,GPG_ERR_ENOSTR:32861,GPG_ERR_ENOSYS:32862,GPG_ERR_ENOTBLK:32863,GPG_ERR_ENOTCONN:32864,GPG_ERR_ENOTDIR:32865,GPG_ERR_ENOTEMPTY:32866,GPG_ERR_ENOTNAM:32867,GPG_ERR_ENOTSOCK:32868,GPG_ERR_ENOTSUP:32869,GPG_ERR_ENOTTY:32870,GPG_ERR_ENOTUNIQ:32871,GPG_ERR_ENXIO:32872,GPG_ERR_EOPNOTSUPP:32873,GPG_ERR_EOVERFLOW:32874,GPG_ERR_EPERM:32875,GPG_ERR_EPFNOSUPPORT:32876,GPG_ERR_EPIPE:32877,GPG_ERR_EPROCLIM:32878,GPG_ERR_EPROCUNAVAIL:32879,GPG_ERR_EPROGMISMATCH:32880,GPG_ERR_EPROGUNAVAIL:32881,GPG_ERR_EPROTO:32882,GPG_ERR_EPROTONOSUPPORT:32883,GPG_ERR_EPROTOTYPE:32884,GPG_ERR_ERANGE:32885,GPG_ERR_EREMCHG:32886,GPG_ERR_EREMOTE:32887,GPG_ERR_EREMOTEIO:32888,GPG_ERR_ERESTART:32889,GPG_ERR_EROFS:32890,GPG_ERR_ERPCMISMATCH:32891,GPG_ERR_ESHUTDOWN:32892,GPG_ERR_ESOCKTNOSUPPORT:32893,GPG_ERR_ESPIPE:32894,GPG_ERR_ESRCH:32895,GPG_ERR_ESRMNT:32896,GPG_ERR_ESTALE:32897,GPG_ERR_ESTRPIPE:32898,GPG_ERR_ETIME:32899,GPG_ERR_ETIMEDOUT:32900,GPG_ERR_ETOOMANYREFS:32901,GPG_ERR_ETXTBSY:32902,GPG_ERR_EUCLEAN:32903,GPG_ERR_EUNATCH:32904,GPG_ERR_EUSERS:32905,GPG_ERR_EWOULDBLOCK:32906,GPG_ERR_EXDEV:32907,GPG_ERR_EXFULL:32908,GPG_ERR_CODE_DIM:65536,;gpg_err_code_t:t458=457gpg_error_t:t459=-81iovec:T460=s8iov_base:17,0,32;iov_len:10,32,32;;Rxmem_phys:T461=s16total:-1,0,32;used:-1,32,32;s_vpn:-8,64,32;rpn:462=*187,96,32;;xmem:T463=s16_u:464=u4s:465=s4version:-3,0,16;flag:-3,16,16;;,0,32;_aspace_id:-1,0,32;;,0,32;subspace_id:-1,32,32;subspace_id2:-1,64,32;uaddr:16,96,32;;uio:T466=s40uio_iov:467=*460,0,32;uio_xmem:468=*463,32,32;uio_iovcnt:59,64,32;uio_iovdcnt:59,96,32;uio_offset:250,128,64;uio_resid:59,192,32;uio_segflg:-3,224,16;uio_fmode:-4,256,32;;uio_t:t469=466Ypinu_block:T470=s28next:471=*470,0,32;seg_num:-1,32,32;pincount:-1,64,32;xd:463,96,128;;Muio_rw:T472=eUIO_READ:0,UIO_WRITE:1,UIO_READ_NO_MOVE:2,UIO_WRITE_NO_MOVE:3,;socklen_t:t473=562linger:T474=s8l_onoff:-1,0,32;l_linger:-1,32,32;;sa_family_t:t475=79Tsockaddr:T476=s16sa_len:79,0,8;sa_family:475,8,8;sa_data:477=ar122;0;13;-2,16,112;;msghdr:T478=s28msg_name:17,0,32;msg_namelen:473,32,32;msg_iov:467,64,32;msg_iovlen:-1,96,32;msg_control:17,128,32;msg_controllen:473,160,32;msg_flags:-1,192,32;;Kcmsghdr:T479=s12cmsg_len:473,0,32;cmsg_level:-1,32,32;cmsg_type:-1,64,32;;sockaddr_storage:T480=s136__ss_len:79,0,8;__ss_family:475,8,8;__ss_pad1:481=ar122;0;5;-2,16,48;__ss_align:22,64,64;__ss_pad2:482=ar122;0;112;-2,128,904;;:osockaddr:T483=s16sa_family:233,0,16;sa_data:477,16,112;;N.M zMVM2VpRgvW2Vp\azfB\kp`Hl Fn6^EX ]b0iiFNSXp B D  N   ~  !!N!X!]"""2"6"""$$6$n$v$$%"%J%L%T%%%%&*&"&$&.&X/&l4&|%&/&&*&& &4&9&'*'B'P>'C''''''(((&(,*(>(@(J(R(T(b(d ( (w( ((( ()F )Tw)^ )b)v )) )w**"*. *0*N*P*^*h%*t/*4*%*/** *4++*+: +J++++,  ,w,* ,,,S,S,S,S- -w- -- .w.* .,.pN.S. .w..//" /$/~//0.0dH0n0r0v0 0w00 0000011:1b11122*2`S2`2~222 3"3F$3n&3(3*3,4.4604`B4b5j25456586X6X]6:6/6<6>66667T78@9E:BB:;;Ù;$ƙ;2D;JD;d;xL;;C;9;C;C;F;H<<H<>: ƙ>ƙ?"J?&L?*N?.P?2R?T?V@>F@NN@ƙ@@L@AFAPABRBCJCXݙCSCDxSDDbE(BEEVETFƙF$FbFfVFjTGƙG GJGNVGRTGƙGXGGHXSHSI.I2VI6TIdbIƙIIXIIBJRDJ˙JЙJՙJڙK6ZK^\K^K`KbKdL&fLNhLvjLlLnLXM<]MߙMpM%N2rN4%NBtNJvNRxNZzNb|Nj~NNN%O*O.O4%ONOP%OvO~O%OOOO%QpbRiRRRRS&S.S8SnS~SSSSTT"T,U8UÙUNUbVV V XÙX0NXÙXNXXXZ\Ù\N_͙_jd4idHÙdg ig\hthi\ijLNjjjbk$NkikikNkؙlNl8lblNm$mDimmmmmmؙnNn$n6nnnn noop p ppqLNqhؙqbrtbt:t<t^t`u"u(uwtxxNyyybz(z<N}} }}X@Uƙ  h l t x                             ( , 4 8 @ D L P X \ d h p t |                            $ ( 0 4 < @ H L T X ` d l p x |                            $ , 0 8 < D H P T \ ` h l t x                              ( , 4 8 @ D L P X \ d h p t |                             $ ( 0 4 < @ H L T\ X@ \( `0 d2 h l, p8 t< x& |   = =    =  = = = =  ? ? ?   P > B H  V   ^ ` b 6             F $ (T , 0 4J 8 < @X D H. L P T X \ ` d h l p t x | "   $ d f h j l n p   r t v x  2 2 2            2 R L  z N 4 : |  ~ $* (D ,Z 0V 4V 8V <V @V DV HV LV PV TV XV \V `V dV hV lV pV tV xV |V V V V   V V V V V V V  V X V$0hl(,08<x $ , 4d((04D| \    04HL|  4 D L P T h l           $ ( , @ D p      %        . X X \ ` d h l p   666L6X66666666 66 6 677$74787H7T7d7h7l7p7| 7 7 7 7788 8(8D8`8h8 8 8 888888 9 9909<9|99:::: :$:<: : :s:;;;;; N;,O;0R;DS;HV;\W;`A;dB;lC;p(;t);*;-;.;/;2;>;7;<;;;Z;[;#;$;d;m<o<r<s<u<c<(e<<^>>>> >(><>>s>>s>+>???$?(?,?0?4?8?<?@?D?H?L8???????B@@(@,@0@4@8@L@\@x@@@@ @@@UAAAA A$A(A,A0A4_AlApAtAxA|AAAAiAAAAAABBrB\{BBBBBBBCCC CCC,CH CXCCCCCCC CC CC CCCCC D D,D,D0D8D<DHD\ DdDh DlDp DtDxDDD D DDDEE E E E( E0EL ExEEEEE FFPF`FlFFF FG8GHGTGdG|G GH,H4H8HDHLHTHXH`HHHHHHHHII,I8ILI`IpIx II II I IJJPJPJTJ\J`JdJhJJJJJ LL M0M< MtMtMxMMMMNNN N N N(N0N@NHNP NX N` Nh NNNNNNN N N NNNN&N'O*OO O$O(O0O4O< OL!OX"O`$OlOtOxO|OOOOOO OOOOOOOP PP P, P4 P\P\P`PhPlP|PPPsP PP PP PsP PPQQQQQQQ$Q($QHsQL'QlQ|QQ QQ RRRRRR, R0R4 R@ RD RH RLR\R|!R#RRR !RRRRR +S S$S0S8S@ 4ShSlSpS|SSSSS =SSSSS GTTT$T,T4 QT\T\T`TxT|TTT T T1T6T8T9T2T3U U(U, U0UHULUPUTUdUl Ut#UxU'U)U+U)U+U-U,U-U!UUUUU V$ yV@V@VDVLVPVTV\ V\ V` Vd VlVx V|VVVVVVVVVVVVV W W WWW W0WH WLJWl Wp Wt WxWWWW#WGWIW+W-W0W5W8W;X>X?XAX$CX,AX0CX<DXD9XL6XT1X\2Xd3Xl$Xx%X'X%X'X(X'X(XXXXXXXX< YY  YPYPYTYXY\Y`Yh Y| Y(Y.Y)Y+Y*Y/YYYYYY"Z$Z ZZ Z(Z0Z8Z< ZlZlZpZ|ZZZZ Z Z Z ZZ(Z,Z/Z,Z-Z.Z/Z.Z/Z0Z4[ 3[[[ [4[<[D#[L%[X[` [l[t[|[[ [[ [[[[[ [ [B\\$\,\4 \D#\H \L%\P(\`-\h0\p4\x7\|6\7\8\:\<\=\<\:\=\>\=\A\>\?\A\1\.\)\*]+]]]] ](]0]4 ]`]t]|]] ]]]]] ] ^^^ ^0^<^L^X^d^p ^^^^^^^^^^__ _ _ _ 6_<_<_@_D_H_L_P _X a< aH8aLaX@a\Aad ax"a$aaaaaaaaaa0b2b 3b$2b(4b,2b<'b*b)b*c+c*c-c :c,=c8; Ecdcdchct cxccccccccccc cccc cc cd dd d5d4d5d$4d(5dD8dT;d\9dd;dh=dMdOdQfZf^f`f^fbfcfdff;fffffggggg0gXgdglgxsgxgghhh uh zh({h,wh0xh8h<h@h@hHhhPjhTlhXjh\nh`ohdphdzhhhhhhhhhhhhhiiiiiii i(i0i8iDiLiXilixiiiiiiiiiii~iiiiiiiiiiiiiijj jjj j$j(j,j4j8jDjHjLjTj`jdjljxj&jFjXjZjXj\jMjNjOjPjQjSjQkRk QkRkSk Rk$Sk,TkH,k`-kl/kt-kx/k|0kAkCkAkBkAkBkCkBkCkDk8l;l 8l;l <l,=l0<l8=l@>ldl|l l!l#l!l"l!l"l#l"l#l$lllmm4m@mTm\mhmpmtmxmmmmmmmmm mm n  n n n$ n,n4nL^nXjn`wnh|npnxnnnnnnnnnnnnooooo4o8o@oHoPoXo\o`ohopotoxo|oyomoooqooosouotouo`obodobofohogopppp,p0p4p8p@pDpHpLpTp\p`pdplpppxpppppppppp?qCqDqEqGq Iq$Eq,Fq4Eq8FqDGqHFqLGqTHqd6qt qqqq (rDr\ r`rt 5rrrrrr Bs<s<s@sPsTs`sdslspst s ssttth Ttttttttttt t t t t t uuu u$u(u0 `u`u`uduuuuuuw w4w@wLwP9wp w| w wwwwwwwxxx xx #x$"x(#x0%xL/xP#x\1x2x4 uxxxxxxxy yDyP yTypytyxy|y y y y yyCyByCyhyjyhyizjzmz nz0oz8nz<ozLsz\xzdzzh{zl}zxzzzzzzzH{L{ O{$L{(N{,O{4R{@S{LW{\Y{`[{p]{t^{xa{b{V{U{K{J{+{){*{+|.| /|2|1| 2|<4|@5|D6|H9|T;|X:|`;|l<|t;|x?|||||||||||| |!|"|!|$|'|&|'}u }D}D }H}L}P}T}X}\}d}h}t }x }}}s}}}}}}s}v}}}~"~ $~0~0~<1~<6~@4~Ds~H6~L&~\-~`,~d.~l*~p(~ts~x*~9~C~T~^~h~j~~n~l~~s~r~|~zs| vt`$f,0d4b8<s@VH\PTZXX\`sdElKtQIGs;s   X\     0llp     @DHht|        !(4Xh|            , < L            ! 4!t!!!!!""" """"" "$"(","0 "4 "8 "< "@ "D "H "L "P "|"" """""" """"""## # ## #`#x### # # # # #$$$$,$0$4$L$h$$$$$$$ $$ $$ $$$$$$$$%% %$%,%8%H"%|% %'% %'%)%*%)%*%8%@%B&M&,N&8c&h<&=&.&/&.&/&0.'$'(','<'@'D'H'L'P 'X'\'d 'h'p't'x'|''''%''%'+'*'+'/':';'<';'<';'1(2( 1(2(6($&(P(\39((((((((((( (( () ) C)@)D)H)T)\)`)d)h)l)t )x)|)) ) L))))))*****,#*L *\ *h*t**Z+++++( +H+L+T+`+l+p+x+|++ + ++i+,, ,,,(,4 s,x,x,|,,,,,,,,--- ----(~-t--------. ... . .(.4.X.\.h.l.p.x........// /, /x/|/////00, 0< 0@0D 0H0L0\ 0000000@y@DHL T \ h t|            (, 0 8 D X\  #< H L P TXX\`dhlptx|   ``dhlx ( HT  $(@H T X lt | (  / < @ D H T ` p    8      <dpt$#!G $(,<@`d  W,,48DH T`     wtx   PT\p|  ,04Hdx(ptx ,04Hdx  ,tx|  4Pd t    7ALWerrnommap munmap setuid naccept nsendmsg nrecvmsg c_iobmalloc realloc free exit strlen strchr fprintf y write abort atoi isdigit vfprintf sprintf fwrite read strtod select isspace getuid waitpid geteuid memcmp isxdigit __assert iscntrl strerror connect mlock stpcpy          ! < Z q        TOC Tk Tkstrtod Xkstrlen \kwrite `kabort dk hkfprintf lkvfprintf pkfwrite tkexit xk |k3 kG kLC..6 kLC..8 ka ks k kLC..23 k_iob.P64 kLC..16 kLC..21 kLC..19 kLC..25 kcount kops_set kops k kLC..11 kLC..10 k__assert kread kselect kwaitpid knaccept kconnect knsendmsg knrecvmsg k k k kisdigit kc k kmalloc k k  kpool k k kLC..8 kgetuid  kerrno $kstrerror (kLC..13 ,k 0kgeteuid 4ksetuid 8kLC..11 <kmlock @k Dky Hkmmap Lk Pk TkLC..22 XkLC..18 \kLC..26 `k dk hkLC..41 lkLC..37 pkLC..44 tkmunmap xkLC..62 |krealloc kLC..7 kLC..5 kfree k k k k k! k< kZ k k kq k k k k) kLC..2 kLC..1 kLC..5 kL..72 k7 kC kT kd kn ky k k k k kLC..37 kiscntrl kmemcmp k  kisxdigit katoi ksprintf k k  kstrchr $kisspace (kstpcpy ,kLC..14 0kLC..10 4kLC..12 8kLC..8 <kLC..6 @kLC..4 DkLC..2 HkLC..0 LkLC..19 PkLC..28 TkLC..24 XkLC..26 \kLC..22 `kLC..18 dkLC..16 hkLC..31 lkLC..30 pkLC..34 tkLC..37 xkLC..40 |kLC..43 kLC..46 kLC..49 kL..359 kL..414 kLC..58 kLC..55 k kLC..60 kLC..64 kLC..62 kLC..66 kL..645 kLC..71 kempty.1 kLC..73 k gmisc.cglm)l) m.textkX9Th~fw(:Nd{ 5Kaxn kD.bfeLbase:R-1.efeM"3FZn )8HXj{ /AQct ->N`q  $ 4 F Z n : K _ p   ( 7 L b v / B n  7 K c (m  4GZl~ /EVgz,An J]m0CTfvJk->j|.strtold$ kDD.bf$e__a:R49__b:R51.efHe7m/h(o%\pY!!(!^":"%4%&'5'b''((())*9*^*r*+--./n/0Y01V334R4g556688959F99;;#;;<<==>nAEA}AB}BCCCD/EF FYFFGGOHHIIIJTJJL[LsLLMNNTPQSSsXsrssttuduuuvv3vgv}vwwwx`xxymzJzbz}z{$|||| PK73`$f(d>h<] ?o/u :X4CQ_ndyh D.bfhe*.ef|e+ |".bfe1key:R49.efe6( PRH.bf(e:fnc:R588.efDe<x khv.bfxeAs:R49.efeB Lj.bfeKrc:R-1text:R49.efteU H/.bfe[f:R591K.efe] DX.bfebw.efec( TH.bf(ehw.efPej$| k*.bf|erwfmt:R49.efe0  \Ȑ@.bf ewfmt:R49.ef\e;| Lȴ.bf|efile:R49line:R-1func:R49.efeF l.bfefmt:R49.ef eV 4 p T.bf 4efmt:R49.ef |eg  hD .bf efmt:R49.ef ex  dt#,.bf efmt:R49.ef Le p pɤ%8.bf pefmt:R49.ef e  x.O.bf efmt:R49.ef 0e X l =gx.bf Xe8.bb pd .eb d.ef eknz hk  z h?  tk   tC  k   G  k   K  k   O  k   S  k   W 1 k  1 [ < k  < _ G k  G c W k  W g h k  h k y k  y o  k   s  k   w  k   {  k g.text k4   `$  (k   (  4k   4  @k   @ % Lk  % L 1 k global.cgRl^m)dl)pmgcrypt.hlgcrypt.hmAlAmA͂lA͈mA͔lA͚mgcrypt.hͲlgcrypt.hͲmA͸lA͸mgcrypt.h;lgcrypt.h;m.text6k,X9Th~fw(:Nd{ 5Kaxn6 kDR.bf6eLbase:R-1.ef6,eM"3FZn )8HXj{ /AQct ->N`q  $ 4 F Z n : K _ p   ( 7 L b v / B n  7 K c (m  4GZl~ /EVgz,An J]m0CTfvJk->j|.strtold6L kDdD.bf6Le__a:R49__b:R51.ef6pe7m/h(o%\pY!!(!^":"%4%&'5'b''((())*9*^*r*+--./n/0Y01V334R4g556688959F99;;#;;<<==>nAEA}AB}BCCCD/EF FYFFGGOHHIIIJTJJL[LsLLMN\x#=Su/@2HB+g8-Hesš®ljDzPRlɄU̍Tlͱ+bΕ1ЬQpќ/\҅ҵ 3]ӅӲ(UxԲ :aֈ֬@Ztؙش#*9ڴ/X}6 kv.bf6e=err:r484.ef7eO7$ k1.bf7$eTs:R49Lval:r-1.bb7d Oval:r-1.eb7d .ef7e_8 k*^.bf8eds:R49y݆ݓ.ef8eq8 <fݠ.bf8e{ݹver:r498<@DHL-.ef9e: ˺;.bf:ecmd:R513err:r484.bb:d .bb:d .bb:d .eb;d.eb;d.eb;d.bb<,de.bb<,de.bb<,de.eb<<de.eb<<de.eb<<de.bb |v.bf>eKerr:R-1.bb>d.eb>Pd.ef>PeC> dͦ+x.bf>eSerr:R-1.bb>d.bb>d.eb>d.eb>d.ef>eZ> 8$.bf>e_G]zߔ߬.ef?hefw? x$B .bf?e|f:R581.ef?e@ TU .bf@en:R10 err:r484m:r17.bb@d err:r484m:r17.eb@d.ef@eA Xκ_ .bfAen:R10mem:178.efAHeAl \i$ d.bfAlen:R10mem:178.efAeA 2r= .bfAeR.efB8eB\ 4h{e T.bfB\ea:R663.efBheB xt} .bfBea:R17n:R10.efBeC |Ϥ .bfCep:R17.efCdeC  |.bfCen:R10m:R10p:r17.bbCd Xp:r17.ebDd .efDe D, F$.bfD,en:R10m:R10p:r17.bbDd jp:r17.ebDd .efDeD в.bfDe .bbELd {.ebETd .efETe+Ex p.bfExe!n:R10p:r17.efF,e+9FP $)H.bfFPe/a:R17n:R10p:r17.efGe9HG8 T=0.bfG8e=n:R10p:r17.efHeH]H, tфW$.bfH,eLn:R10m:R10p:r17.efH|ePkH |Ѻj.bfHeTn:R10m:R10p:r17.efHeXI 4.bfIe\p:r16.bbI`d.ebId.efJ,enJP HJH.bfJPesmask:R-8.efJleuJ z.bfJecb:R566.efKe.bs .es.bs.es.bs.es.bs+.es.bsA.es.bsU .es.bsf$.es.bs(.es k= k   4  k   8  k   <  k   @  $k   $D  0k   0H * <k  * <L D Hk  D HP [ Tk  [ TT x `k  x `X  lk   l\  xk   x`  k   d  k   h  k   l  k   p  k   t  k   x  k   |  k    , k  ,  : k  :  I k  I  ^ k  ^  l k  l   k     ,k   ,  8k   8  Lk, sexp.cgҞlҪm)Ұl)Ҽmgcrypt.hԜlgcrypt.hԜmgcrypt.hlgcrypt.hmgcrypt.hlgcrypt.hmA|lA|mgcrypt.h߂lgcrypt.h߂mAlAmgcrypt.hlgcrypt.hmAlAmgcrypt.h"lgcrypt.h"mgcrypt.hjlgcrypt.hjmgcrypt.hlgcrypt.hmAlAmAlAmgcrypt.hlgcrypt.hmgcrypt.hlgcrypt.hmAlAmAlAmA*lA*mA<lA<mgcrypt.hBlgcrypt.hBmATlATmAflAfmgcrypt.hllgcrypt.hlmAlAmAlAmgcrypt.hlgcrypt.hmAlAmAlAmgcrypt.hlgcrypt.hm.textLk3X9Th~fw(:Nd{ 5KaxnL kDҞ .bfLeLbase:R-1.efMeM"3FZn )8HXj{ /AQct ->N`q  $ 4 F Z n : K _ p   ( 7 L b v / B n  7 K c (m  4GZl~ /EVgz,An J]m0CTfvJk->j|.strtoldM0 kDҰ D.bfM0e__a:R49__b:R51.efMTe7m/h(o%\pY!!(!^":"%4%&'5'b''((())*9*^*r*+--./n/0Y01V334R4g556688959F99;;#;;<<==>nAEA}AB}BCCCD/EF FYFFGGOHHIIIJTJJL[LsLLMN\x#=Su/@2HB+g8-Hesš®ljDzPRlɄU̍Tlͱ+bΕ1ЬQpќ/\҅ҵ 3]ӅӲ(UxԲ :aֈ֬@Ztؙش#*9ڴ/Mt k( .bfMtePn:R10.efNxeeN <@ .bfNel*p:r6598type:r-1.bbOdXn:6578.ebOdd$.efOeO k E.bfOeV .bbP de.ebP<d.efP<e P\ pf bp.bfP\ez<se:514@8.bbQld|<se:514@8.ebQd.efQe Q 4, .bfQe&.efQe #R > !>.bfReW.bbR,d p:r659 type:r-1.bbR\dc y.ebR|d!.ebR|d!.bbRdp:r659 type:r-1.bbRdn:6578.ebRd.ebRd.efRe 6R Dհ +.bfRe$a:R661b:R661.efRe( FS  H 44.bfS e2.efS@e6 WSh d =|.bfShe>a:R661.efSeB hS H4 G.bfSeLa:R661n:R661.efSeP zT HX Q(.bfTeUa:R661n:R661.efT4eY T\ | y p.bfT\ed(tok:R494p:r659n:6578.bbUd3A.ebU d3.bbUd A.bbUHdM\.ebUd-.ebUd-.bbVd$A.bbVd$M\.ebVd$.ebVd$.efVe V@ ~ h T.bfV@e( p:r659n:657type:r-1 \ .efVe W    .bfW e(p:r659n:6578M\.bbWd+!A.ebXldD.bbXd<&A.ebXd<.efXe Y 4^  0.bfYe(.efY,e YP p  d.bfYPe (p:r659n:657\ .bbYdDp:r659n:657\ .ebZDd$.efZDeN Zl L  .bfZleUV p:r659n:6578\ .bbZd,Xa:508<@.ebZd4.bb[ d3_p:r659n:6578\ .eb[d3.ef[e [  !.bf[e(p:r659An:6578M6\skip:r-1 .bb\dzp:r659An:6578Md:r670\skip:r-1 .eb]<dA.ef]<e ]` l. Dt.bf]`e(a:r514b:r514.ef]e ] kR Z.bf]es:R659c:r-1 .bb^dc:r-1 .eb^|d.ef^|e $^ kܲ 6j.bf^e|n:R10 used:r10.bb^d.eb^d.bb^d.eb^d.bb^d.eb^d.bb^d.eb^d.bb^d.eb^d.bb_d.eb_d .ef_e 0_< k( EP.bf_<ebuf:R15esc:r-1 s:r673d:r15n:r10.efc@eT @cd k8 x.bfcdeperr:r484.bsX.esp:r49n:r104@MZg t|c:6718\.bbg0d y.ebgXd.bbgpd.bbgpd.bbgpd.ebgd.ebgd.ebgd.bbhdlen:r10.bbhd J.ebhd.bbhdJ.ebid.bbidL.ebid.bbidL.ebi d.ebi d.bbj,dP.ebj4d.bbj8d$P.ebjDd.bbjHd)P.ebjLd.bbjdM>aint:r-1buf:242X.bbkdR2x.ebk dR.bbkdR7x.ebkdS.bbk dR<x.ebk$dS.ebkHdT.bbkHd,Xastr:r49alen:r-1.bbkdBGV.ebkdB.bbkdBLV.ebkdC.bbkdBQV.ebkdC.bbkd8V.eblHd>.ebldd>.bblddlastr:r49.bbld"`T.ebld".bbld"eT.ebld#.bbld"jT.ebld#.ebld$.bbldm:r508nm:10.bbmpduR.ebmtd.bbmxdzR.ebmd.bbmdR.ebmd.bbmdR.ebmd.bbmd.ebn4d.ebnLd^.bbpxdN.ebpd.bbpdN.ebpd.bbq,dFH.ebq4dF.bbq8dFH.ebqDdG.bbqHdFH.ebqLdG.efq|eE Lq  ($.bfqeI.efreN ]rD  5 %X.bfrDeZ=8.efrec tr T6 BM%.bfrel8.efses s< kd` Td&P.bfs<e|s:r673.bbt8ds:r673.ebtxd.eftxe t k `'.bftesrc:R673len:R10dest:R15i:r-1.efu<e u` kpJ u(t.bfu`es:R673len:R10dest:R15.bbudp:r15.ebx d9.bbx d#.ebxd4.efxe x kt. +.bfxesrc:R673len:R10dest:R15.efye yD d ,X.bfyDe(mode:R-1.bsX .ess:r659d:r16n:6578;@len:r108.bbzdH"type:r-1nn:r10.eb{db.ef}e }D VH0X.bf}De|p:r673t\.bb}dB.bb}d@.bb}d>.eb}d.eb}d.eb}d.bb}dp:r673t\.bb~dW.bb~dU.bb~dS.eb~dn.eb~dn.eb~dn.bb~dc.bb~da.bb~d_.eb~dr.eb~dr.eb~dr.bbdo.bbdm.bbdk.eb dv.eb dv.eb dv.bbd{.bbdy.bbdw.ebd`.ebd`.ebd`.bb,d.bb,d.bb,d.eb0dd.eb0dd.eb0dd.bb8d.bb8d.bb8d.eb@dV.eb@dV.eb@dV.bbPd.bbPd.bbPd.ebTdZ.ebTdZ.ebTdZ.bb\d.bb\d.bb\d.ebddE.ebddE.ebddE.bbd.bbd.bbd.ebdI.ebdI.ebdI.bbd.bbd.bbd.ebd;.ebd;.ebd;.bbd.bbd.bbd.ebd.ebd.ebd.bbd.bbd.bbd.ebd .ebd .ebd .ebd .efe `k k Dk   DZ  Pk   P^  \k   \b $ hk  $ hf 7 tk  7 tj G k  G n X k  X r i k  i v { k  { z k  ~ k   k   k   k   k   k   k   M k  M  ^ k  ^  u (k  u ( 4k  4 @k  @ stdmem.cglm)l)m.textk|X9Th~fw(:Nd{ 5Kaxn kD.bfeLbase:R-1.efeM"3FZn )8HXj{ /AQct ->N`q  $ 4 F Z n : K _ p   ( 7 L b v / B n  7 K c (m  4GZl~ /EVgz,An J]m0CTfvJk->j|.strtold kDD.bfe__a:R49__b:R51.ef8e7m/h(o%\pY!!(!^":"%4%&'5'b''((())*9*^*r*+--./n/0Y01V334R4g556688959F99;;#;;<<==>nAEA}AB}BCCCD/EF FYFFGGOHHIIIJTJJL[LsLLMN\x#=Su/@2HB+g8-Hesš®ljDzPRlɄU̍Tlͱ+bΕ1ЬQpќ/\҅ҵ 3]ӅӲ(UxԲ :aֈ֬@Ztؙش#*9ڴ/ X H.bfXe3.efpe4  .bfe=n:R10.bbdp:r16.ebd.bbdp:r16.ebd.bb0d.eb@d.ef@eP 3l -.bfleXn:R10.bbdp:r16.ebd.bbdp:r16.ebd.bbd.eb d.ef ek P@ |Op.bf@eta:R17n:R10.bbtd/b:r16len:r10.ebXd!.efe g k.bfe.bbd=len:r10 .ebd.bbdBlen:r10 .eb Xd.ef Xe   .bf ea:R17.ef! e kQ dk  d  k    4 k  4  Q k  Q  h pk  h p k   k secmem.cgllxm)~l)m.text!tkX9Th~fw(:Nd{ 5Kaxn!t kDl?.bf!teLbase:R-1.ef!eM"3FZn )8HXj{ /AQct ->N`q  $ 4 F Z n : K _ p   ( 7 L b v / B n  7 K c (m  4GZl~ /EVgz,An J]m0CTfvJk->j|.strtold! kD~D.bf!e__a:R49__b:R51.ef!e7m/h(o%\pY!!(!^":"%4%&'5'b''((())*9*^*r*+--./n/0Y01V334R4g556688959F99;;#;;<<==>nAEA}AB}BCCCD/EF FYFFGGOHHIIIJTJJL[LsLLMNNTPssttuduuuvv3vgv}vwwwx`xxym   < ')/C?~j7f(JW  1 G [  !!!!""H"q"""##D#o###$$<%,%J%r%%%&&:&b'''(((?(m()M)g)v)))***+ ! k+.bf!ekadd:R10sub:R10.ef"Xev "| k\+-.bf"|e{mb:R672+E.ef"e " kV+Td.bf"emb:R672+g.ef#<e #` k+v.bf#`emb:R672+g+E.ef#e $ k+.bf$e+size:R10mb:r672+.bb$d Cmb:r672+.eb$d.ef$e % k`"+.bf%e.ef%`e %| k.+.bf%|ep:R17n:R10uid:r115err:r-1.ef'eB '$ kh<9+.bf'$eGn:R10+mb:r672 .ef(le ( 8C+.bf(e,.ef)e ()@ L,#.bf)@e,@.ef)e @) 0Z,L\.bf)en:R10.bb*\d uid:r115.eb*d.ef*e S+ kji,e .bf+esize:R10mb:r672.bb+d mb:r672.eb+d .ef+e q+ |s, .bf+esize:R10p:r17.ef,Le ,x k ~, .bf,xea:R17mb:r672size:r-1.ef-De -t p~, .bf-tea:R17.ef-e! - , p.bf-e'p:R17,size:r10a:r17.bb.Xdsize:r10a:r17.eb.d.ef.eC . - P.bf.eG-$ret:r-1.ef/HeR /x (V-7.bf/xe_.bb/d-P y.eb/d.bb/d-f y.eb/d.bb/d-f y.eb0d.bb0d-f y.eb0,d .ef0|en 0 -s,.bf0es.ef1 ez Hk}  k    ) k  )  A |k  A | r Lk  r L dk  d Xk  X k   k   pk  p   k, .bspool:S17.es.bs-.es.bs-.es.bs- .es.bs-.es.bs-.es.bs-.es.bs..es.bs. .es.bs./$.es.bs.@(.esmodule.cglm.textkX9Th.S.c.s.......///&/:/P/g/~/////0 0!070M0d0{00n kDK0.bfeL00base:R-1.ef eM11#161J1^1t1111112 22(282H2Z2k2~222222233 313B3S3e3u3333333444"414@4Q4b4r4444444555%585J5Z5l5555555566_6p666666677'7<7M7\7q777788T8g888899!9@9`9t99::Q:::::; ;!;3;I;];p;;;;;;;<<<#<4>3>>?s???????@@@#@Y@l@}@@@@@AAsAAAB BCBBBBBCCC+DDddddeMeffgg]gqgghhiiijjkkkl+lilllm&m`mmn-nvnnnoo!oq/qVqjq}vEvnvvw wwxx(x@zz{I{||(|m|||}}Q}|}~~h ,XBrCp6pFj2Wrx +@ kD.bf@e!8GYf err:r302 .bbdYf err:r302 .ebd.efe= @ 8s.bfeDterr:r302.bb<d err:r302.ebd .efef R kh.bfel .ef8eq e` hd.bf`ex&.efe } 3.bfeNZ.bbHd.ebXd.efXe  \,f.bfe .efe  @V.bfe.efe   t$.bf e8 i:r-1 .efe A k  A  f k  f  ~ k  ~  k   k   k   ath.cAglm.text k hX9T#5FXj} $;Sk 6n  kD3h.bf eLxbase:R-1.ef eM+BZq 0BVi{&7H[n#4EVh~  2CScs!4H]s'Zn1auVIYj /CScu+@R7Un0CWi})9K] O`.EYn_<v3uIeMbo>ln6L)fH7] `Q)gzA[q{  < 8D.bf <e=err:r-1.ef eI   $(G.bf eQ .bbd^ .ebd$.efet  kW.bfeyerr:r-1.bbd nerr:r-1.eb d .ef e , \`%4.bf,e@ .ef\e $wL.bfe@.bbderr:r-1.ebd.bbd.bbderr:r-1.ebDd .ebDd .efDe+t j|.bfte@.bb|dret:r-1.ebd.bbd.bbdret:r-1.eb$d.eb$d.ef$eAP X.bfPe@.bbXdret:r-1.ebpd.bbd.bbdret:r-1.ebd.ebd.efeY,  4.bf,efd:R-1 buf:R98 .efei P.bfefd:R-1  .efHezp x.bfpenfd:R-1  #/ .efe, C4.bf,epid:R113 [ m.efe {.bfes:R-1  .efLet  |.bfte"s:R-1  .efe+ @ .bfe4s:R-1  .efe= p% .bfeFs:R-1 = .ef8eO.bs?ops:S356.es.bs?M<.es8k Xk  X k    k    k    , |k  , | B k  B  Z k  Z  j k  j # {  k  {  '  k   +  $k   $/  0k   03  <k   <7  Hk   H;  k@ strcpy.sD g.strcpy4`)strcmp.sG g.strcmp0)moveeq.sR g.bcopy`A).ovbcopy`H._moveeqlH.memcpylH.memmovelHmemset.sU g.memset2`)glink.sZ gPk(PVglink.s_ g.strtodxk(.strtodx[glink.sd g.strlenk(.strlen`glink.si g.writek(.writeeglink.sn g.abortk(.abortjglink.ss g k( oglink.sx g.fprintf@k(.fprintf@tglink.s} ghk(hyglink.s g.fwritek(.fwrite~glink.s g.exitk(.exitglink.s g%k(%glink.s g8 k(8 glink.s gG4k(G4glink.s g.isdigit\k(.isdigit\glink.s gV2k(V2glink.s go3k(o3glink.s g3Dk(3Dglink.s g3lk(3lglink.s g3k(3glink.s g3k(3glink.s g3k(3glink.s g4 k(4 glink.s g44k(44glink.s g65hk(65hglink.s gV5k(V5glink.s gv5k(v5glink.s g5k(5glink.s g.iscntrlK4k(.iscntrlK4glink.s g.memcmpK\k(.memcmpK\glink.s gKk(Kglink.s gKk(Kglink.s g.atoiKk(.atoiKglink.s g.sprintfKk(.sprintfKglink.s gL$k(L$glink.s gLLk(LLglink.s g.strchrLtk(.strchrLtglink.s g.isspaceLk(.isspaceL glink.s g.stpcpyLk(.stpcpyLglink.s g.malloc!Lk(.malloc!Lglink.s g.realloc2k(.realloc2glink.s" g.free2k(.free2glink.s' g.getuid18k(.getuid18#glink.s, g1`k(1`(glink.s1 g.geteuid1k(.geteuid1-glink.s6 g.setuid1k(.setuid12glink.s; g.mlock1k(.mlock17glink.s@ g2k(2<glink.sE g.mmap2(k(.mmap2(Aglink.sJ g.munmap2|k(.munmap2|Fglink.sO g k( Kglink.sT g.readk(.readPglink.sY g.selectk(.selectUglink.s^ g.waitpidk(.waitpidZglink.sc g.nacceptDk(.nacceptD_glink.sh g.connectlk(.connectldglink.sm gk(iglink.s gk(n)gpg_strsourcegpg_strerrorgpg_err_code_from_errno___memset.___memset___memmove.___memmove_system_configurationgetpagesize__strtollmax_gcry_cipher_init_gcry_md_init_gcry_pk_init_gcry_random_dump_stats_gcry_secure_random_alloc_gcry_random_initialize_gcry_quick_random_gen_gcry_set_random_seed_file_gcry_update_random_seed_file_gcry_fast_random_poll_gcry_register_pk_dsa_progress_gcry_register_pk_elg_progress_gcry_register_primegen_progress_gcry_register_random_progressgcry_mpi_scangcry_mpi_printgcry_mpi_get_flaguser_gettext_handlerfatal_error_handlerfatal_error_handler_valuelog_handler_valuelog_handlerverbosity_levelcheck_init_lockuse_m_guardcur_allocedcur_blockspool_sizeno_warningshow_warningdisable_secmempool_okaypool_is_mmappedsecmem_locksuspend_warningany_init_donedebug_flagsno_secure_memoryinit_finished.0free_funcalloc_funcalloc_secure_funcis_secure_funcrealloc_funcoutofcore_handler_valueoutofcore_handlertokenchars.0/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/sys/inttypes.h/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdlib.h.strtoimax.gcry_set_gettext_handler._gcry_gettext.gcry_set_fatalerror_handler.write2stderr._gcry_fatal_error.gcry_set_log_handler._gcry_set_log_verbosity._gcry_log_verbosity._gcry_logv._gcry_log._gcry_bug._gcry_log_info._gcry_log_error._gcry_log_fatal._gcry_log_bug._gcry_log_debug._gcry_log_printf._gcry_burn_stack_misc.rw_c_misc.bss_c/tmp/ccfsbEAa.c._GLOBAL__FI_libgcrypt_so._GLOBAL__FD_libgcrypt_so._GLOBAL__DI._GLOBAL__DD_ccfsbEAa.bss_c/internet/pa/libgpg-error-1.0/usr/local/include/gpg-error.h.global_init.parse_version_number.parse_version_string.gcry_check_version.gcry_control.gcry_strerror.gcry_strsource.gcry_err_code_from_errno.gcry_err_code_to_errno.gcry_err_make_from_errno.gcry_error_from_errno.gcry_set_allocation_handler.gcry_set_outofcore_handler._gcry_malloc.gcry_malloc.gcry_malloc_secure.gcry_is_secure._gcry_check_heap.gcry_realloc.gcry_free.gcry_calloc.gcry_calloc_secure.gcry_strdup.gcry_xmalloc.gcry_xrealloc.gcry_xmalloc_secure.gcry_xcalloc.gcry_xcalloc_secure.gcry_xstrdup._gcry_get_debug_flag.gcry_set_progress_handler_global.rw_c_global.bss_c.dump_string.gcry_sexp_dump.normalize.gcry_sexp_create.gcry_sexp_new.gcry_sexp_release.gcry_sexp_cons.gcry_sexp_alist.gcry_sexp_vlist.gcry_sexp_append.gcry_sexp_prepend.gcry_sexp_find_token.gcry_sexp_length.gcry_sexp_nth.gcry_sexp_car.gcry_sexp_nth_data.gcry_sexp_nth_mpi.gcry_sexp_cdr.gcry_sexp_cadr.hextobyte.make_space.unquote_string.sexp_sscan.gcry_sexp_build.gcry_sexp_build_array.gcry_sexp_sscan.suitable_encoding.convert_to_hex.convert_to_string.convert_to_token.gcry_sexp_sprint.gcry_sexp_canon_len_sexp.rw_c._gcry_private_enable_m_guard._gcry_private_malloc._gcry_private_malloc_secure._gcry_private_realloc._gcry_private_check_heap._gcry_private_free_stdmem.rw_c_stdmem.bss_c.stats_update.mb_get_next.mb_get_prev.mb_merge.mb_get_new.print_warn.lock_pool.init_pool._gcry_secmem_set_flags._gcry_secmem_get_flags._gcry_secmem_init._gcry_secmem_malloc_internal._gcry_secmem_malloc._gcry_secmem_free_internal._gcry_secmem_free._gcry_secmem_realloc._gcry_private_is_secure._gcry_secmem_term._gcry_secmem_dump_stats_secmem.rw_c_secmem.bss_c._gcry_module_id_new._gcry_module_add._gcry_module_drop._gcry_module_lookup_id._gcry_module_lookup._gcry_module_release._gcry_module_use._gcry_module_list._gcry_ath_init._gcry_ath_install.mutex_init._gcry_ath_mutex_init._gcry_ath_mutex_destroy._gcry_ath_mutex_lock._gcry_ath_mutex_unlock._gcry_ath_read._gcry_ath_write._gcry_ath_select._gcry_ath_waitpid._gcry_ath_accept._gcry_ath_connect._gcry_ath_sendmsg._gcry_ath_recvmsg_ath.rw_c_ath.bss_c.__strtollmax.gpg_strerror.vfprintf._gcry_cipher_init._gcry_md_init._gcry_pk_init._gcry_random_dump_stats._gcry_secure_random_alloc._gcry_random_initialize._gcry_quick_random_gen._gcry_set_random_seed_file._gcry_update_random_seed_file._gcry_fast_random_poll.gpg_strsource.gpg_err_code_from_errno._gcry_register_pk_dsa_progress._gcry_register_pk_elg_progress._gcry_register_primegen_progress._gcry_register_random_progress.gcry_mpi_scan.isxdigit.gcry_mpi_print.gcry_mpi_get_flag.strerror.getpagesize.__assert.nsendmsg.nrecvmsg56 318104 158 0 0 0 0 0 ` 1 158 libgcrypt.so.117012 0 317934 0 0 0 0 0 ` .gcry_set_gettext_handler._gcry_gettext.gcry_set_fatalerror_handler._gcry_fatal_error.gcry_set_log_handler._gcry_set_log_verbosity._gcry_log_verbosity._gcry_log._gcry_bug._gcry_log_info._gcry_log_error._gcry_log_fatal._gcry_log_bug._gcry_log_debug._gcry_log_printf._gcry_burn_stackgcry_set_gettext_handler_gcry_gettextgcry_set_fatalerror_handler_gcry_fatal_errorgcry_set_log_handler_gcry_set_log_verbosity_gcry_log_verbosity_gcry_log_gcry_bug_gcry_log_info_gcry_log_error_gcry_log_fatal_gcry_log_bug_gcry_log_debug_gcry_log_printf_gcry_burn_stack._GLOBAL__FI_libgcrypt_so._GLOBAL__FD_libgcrypt_so._GLOBAL__DI._GLOBAL__DD_GLOBAL__FI_libgcrypt_so_GLOBAL__FD_libgcrypt_so_GLOBAL__DI_GLOBAL__DD.gcry_check_version.gcry_control.gcry_strerror.gcry_strsource.gcry_err_code_from_errno.gcry_err_code_to_errno.gcry_err_make_from_errno.gcry_error_from_errno.gcry_set_allocation_handler.gcry_set_outofcore_handler._gcry_malloc.gcry_malloc.gcry_malloc_secure.gcry_is_secure._gcry_check_heap.gcry_realloc.gcry_free.gcry_calloc.gcry_calloc_secure.gcry_strdup.gcry_xmalloc.gcry_xrealloc.gcry_xmalloc_secure.gcry_xcalloc.gcry_xcalloc_secure.gcry_xstrdup._gcry_get_debug_flag.gcry_set_progress_handlergcry_check_versiongcry_controlgcry_strerrorgcry_strsourcegcry_err_code_from_errnogcry_err_code_to_errnogcry_err_make_from_errnogcry_error_from_errnogcry_set_allocation_handlergcry_set_outofcore_handler_gcry_mallocgcry_mallocgcry_malloc_securegcry_is_secure_gcry_check_heapgcry_reallocgcry_freegcry_callocgcry_calloc_securegcry_strdupgcry_xmallocgcry_xreallocgcry_xmalloc_securegcry_xcallocgcry_xcalloc_securegcry_xstrdup_gcry_get_debug_flaggcry_set_progress_handler.gcry_sexp_dump.gcry_sexp_create.gcry_sexp_new.gcry_sexp_release.gcry_sexp_cons.gcry_sexp_alist.gcry_sexp_vlist.gcry_sexp_append.gcry_sexp_prepend.gcry_sexp_find_token.gcry_sexp_length.gcry_sexp_nth.gcry_sexp_car.gcry_sexp_nth_data.gcry_sexp_nth_mpi.gcry_sexp_cdr.gcry_sexp_cadr.gcry_sexp_build.gcry_sexp_build_array.gcry_sexp_sscan.gcry_sexp_sprint.gcry_sexp_canon_lengcry_sexp_dumpgcry_sexp_creategcry_sexp_newgcry_sexp_releasegcry_sexp_consgcry_sexp_alistgcry_sexp_vlistgcry_sexp_appendgcry_sexp_prependgcry_sexp_find_tokengcry_sexp_lengthgcry_sexp_nthgcry_sexp_cargcry_sexp_nth_datagcry_sexp_nth_mpigcry_sexp_cdrgcry_sexp_cadrgcry_sexp_buildgcry_sexp_build_arraygcry_sexp_sscangcry_sexp_sprintgcry_sexp_canon_len._gcry_private_enable_m_guard._gcry_private_malloc._gcry_private_malloc_secure._gcry_private_realloc._gcry_private_check_heap._gcry_private_free_gcry_private_enable_m_guard_gcry_private_malloc_gcry_private_malloc_secure_gcry_private_realloc_gcry_private_check_heap_gcry_private_free._gcry_secmem_set_flags._gcry_secmem_get_flags._gcry_secmem_init._gcry_secmem_malloc._gcry_secmem_free._gcry_secmem_realloc._gcry_private_is_secure._gcry_secmem_term._gcry_secmem_dump_stats_gcry_secmem_set_flags_gcry_secmem_get_flags_gcry_secmem_init_gcry_secmem_malloc_gcry_secmem_free_gcry_secmem_realloc_gcry_private_is_secure_gcry_secmem_term_gcry_secmem_dump_stats._gcry_module_add._gcry_module_lookup_id._gcry_module_lookup._gcry_module_release._gcry_module_use._gcry_module_list_gcry_module_add_gcry_module_lookup_id_gcry_module_lookup_gcry_module_release_gcry_module_use_gcry_module_list._gcry_ath_init._gcry_ath_install._gcry_ath_mutex_init._gcry_ath_mutex_destroy._gcry_ath_mutex_lock._gcry_ath_mutex_unlock._gcry_ath_read._gcry_ath_write._gcry_ath_select._gcry_ath_waitpid._gcry_ath_accept._gcry_ath_connect._gcry_ath_sendmsg._gcry_ath_recvmsg_gcry_ath_init_gcry_ath_install_gcry_ath_mutex_init_gcry_ath_mutex_destroy_gcry_ath_mutex_lock_gcry_ath_mutex_unlock_gcry_ath_read_gcry_ath_write_gcry_ath_select_gcry_ath_waitpid_gcry_ath_accept_gcry_ath_connect_gcry_ath_sendmsg_gcry_ath_recvmsg.strcpy.strcmp.bcopy.ovbcopy._moveeq.memcpy.memmove.memset.__strtollmax.strtod.strlen.write.abort.gpg_strerror.fprintf.vfprintf.fwrite.exit._gcry_cipher_init._gcry_md_init._gcry_pk_init.isdigit._gcry_random_dump_stats._gcry_secure_random_alloc._gcry_random_initialize._gcry_quick_random_gen._gcry_set_random_seed_file._gcry_update_random_seed_file._gcry_fast_random_poll.gpg_strsource.gpg_err_code_from_errno._gcry_register_pk_dsa_progress._gcry_register_pk_elg_progress._gcry_register_primegen_progress._gcry_register_random_progress.iscntrl.memcmp.gcry_mpi_scan.isxdigit.atoi.sprintf.gcry_mpi_print.gcry_mpi_get_flag.strchr.isspace.stpcpy.malloc.realloc.free.getuid.strerror.geteuid.setuid.mlock.getpagesize.mmap.munmap.__assert.read.select.waitpid.naccept.connect.nsendmsg.nrecvmsgLO kNq DCsyBsyB6 ./usr/local/lib/libgcrypt.lafigb# libgcrypt.la - a libtool library file # Generated by ltmain.sh - GNU libtool 1.5.4 (1.1220.2.90 2004/04/03 14:10:19) Debian: 203 $ # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='libgcrypt.so.11' # Names of this library. library_names='libgcrypt.a libgcrypt.a' # The name of the static archive. old_library='' # Libraries that this one depends upon. dependency_libs=' -L/internet/pa/libgpg-error-1.0/usr/local/lib /internet/pa/libgpg-error-1.0/usr/local/lib/libgpg-error.la -lnsl' # Version information for libgcrypt. current=13 age=2 revision=0 # Is this an already installed library? installed=yes # Should we warn about portability when linking against -modules? shouldnotlink=no # Files to dlopen/dlpreopen dlopen='' dlpreopen='' # Directory that this library needs to be installed in: libdir='/internet/pa/libgcrypt-1.2.1/usr/local/lib' nt kڄ DCtyBtyB6 ./usr/local/include/gcrypt.hfigb/* gcrypt.h - GNU cryptographic library interface * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 * 2004 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * * Libgcrypt is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * Libgcrypt is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef _GCRYPT_H #define _GCRYPT_H #include #include #include #include #ifndef _WIN32 #include #endif /*!_WIN32*/ #include /* This is required for error code compatibility. */ #define _GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GCRYPT #ifdef __cplusplus extern "C" { #if 0 /* keep Emacsens' auto-indent happy */ } #endif #endif /* The version of this header should match the one of the library. It should not be used by a program because gcry_check_version() should return the same version. The purpose of this macro is to let autoconf (using the AM_PATH_GCRYPT macro) check that this header matches the installed library. Note: Do not edit the next line as configure may fix the string here. */ #define GCRYPT_VERSION "1.2.1" /* Internal: We can't use the convenience macros for the multi precision integer functions when building this library. */ #ifdef _GCRYPT_IN_LIBGCRYPT #ifndef GCRYPT_NO_MPI_MACROS #define GCRYPT_NO_MPI_MACROS 1 #endif #endif /* We want to use gcc attributes when possible. Warning: Don't use these macros in your programs: As indicated by the leading underscore they are subject to change without notice. */ #ifdef __GNUC__ #define _GCRY_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #if _GCRY_GCC_VERSION >= 30100 #define _GCRY_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) #endif #if _GCRY_GCC_VERSION >= 29600 #define _GCRY_GCC_ATTR_PURE __attribute__ ((__pure__)) #endif #if _GCRY_GCC_VERSION >= 300200 #define _GCRY_GCC_ATTR_MALLOC __attribute__ ((__malloc__)) #endif #endif /*__GNUC__*/ #ifndef _GCRY_GCC_ATTR_DEPRECATED #define _GCRY_GCC_ATTR_DEPRECATED #endif #ifndef _GCRY_GCC_ATTR_PURE #define _GCRY_GCC_ATTR_PURE #endif #ifndef _GCRY_GCC_ATTR_MALLOC #define _GCRY_GCC_ATTR_MALLOC #endif /* Wrappers for the libgpg-error library. */ typedef gpg_error_t gcry_error_t; typedef gpg_err_code_t gcry_err_code_t; typedef gpg_err_source_t gcry_err_source_t; static GPG_ERR_INLINE gcry_error_t gcry_err_make (gcry_err_source_t source, gcry_err_code_t code) { return gpg_err_make (source, code); } /* The user can define GPG_ERR_SOURCE_DEFAULT before including this file to specify a default source for gpg_error. */ #ifndef GCRY_ERR_SOURCE_DEFAULT #define GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_USER_1 #endif static GPG_ERR_INLINE gcry_error_t gcry_error (gcry_err_code_t code) { return gcry_err_make (GCRY_ERR_SOURCE_DEFAULT, code); } static GPG_ERR_INLINE gcry_err_code_t gcry_err_code (gcry_error_t err) { return gpg_err_code (err); } static GPG_ERR_INLINE gcry_err_source_t gcry_err_source (gcry_error_t err) { return gpg_err_source (err); } /* Return a pointer to a string containing a description of the error code in the error value ERR. */ const char *gcry_strerror (gcry_error_t err); /* Return a pointer to a string containing a description of the error source in the error value ERR. */ const char *gcry_strsource (gcry_error_t err); /* Retrieve the error code for the system error ERR. This returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report this). */ gcry_err_code_t gcry_err_code_from_errno (int err); /* Retrieve the system error for the error code CODE. This returns 0 if CODE is not a system error code. */ int gcry_err_code_to_errno (gcry_err_code_t code); /* Return an error value with the error source SOURCE and the system error ERR. */ gcry_error_t gcry_err_make_from_errno (gcry_err_source_t source, int err); /* Return an error value with the system error ERR. */ gcry_err_code_t gcry_error_from_errno (int err); enum gcry_thread_option { GCRY_THREAD_OPTION_DEFAULT = 0, GCRY_THREAD_OPTION_USER = 1, GCRY_THREAD_OPTION_PTH = 2, GCRY_THREAD_OPTION_PTHREAD = 3 }; /* Do avoid inclusing of too much W32 stuff, we redefine some types. */ #ifdef _WIN32 #define _GCRY_PTH_FD_SET void #define _GCRY_PTH_SOCKADDR void #define _GCRY_PTH_SOCKLEN_T int #define _GCRY_PTH_MSGHDR void #else #define _GCRY_PTH_FD_SET fd_set #define _GCRY_PTH_SOCKADDR struct sockaddr #define _GCRY_PTH_SOCKLEN_T socklen_t #define _GCRY_PTH_MSGHDR struct msghdr #endif /* Wrapper for struct ath_ops. */ struct gcry_thread_cbs { enum gcry_thread_option option; int (*init) (void); int (*mutex_init) (void **priv); int (*mutex_destroy) (void **priv); int (*mutex_lock) (void **priv); int (*mutex_unlock) (void **priv); ssize_t (*read) (int fd, void *buf, size_t nbytes); ssize_t (*write) (int fd, const void *buf, size_t nbytes); ssize_t (*select) (int nfd, _GCRY_PTH_FD_SET *rset, _GCRY_PTH_FD_SET *wset, _GCRY_PTH_FD_SET *eset, struct timeval *timeout); ssize_t (*waitpid) (pid_t pid, int *status, int options); int (*accept) (int s, _GCRY_PTH_SOCKADDR *addr, _GCRY_PTH_SOCKLEN_T *length_ptr); int (*connect) (int s, _GCRY_PTH_SOCKADDR *addr, _GCRY_PTH_SOCKLEN_T length); int (*sendmsg) (int s, const _GCRY_PTH_MSGHDR *msg, int flags); int (*recvmsg) (int s, _GCRY_PTH_MSGHDR *msg, int flags); }; #define GCRY_THREAD_OPTION_PTH_IMPL \ static int gcry_pth_init (void) \ { return (pth_init () == FALSE) ? errno : 0; } \ static int gcry_pth_mutex_init (void **priv) \ { \ int err = 0; \ pth_mutex_t *lock = malloc (sizeof (pth_mutex_t)); \ \ if (!lock) \ err = ENOMEM; \ if (!err) \ { \ err = pth_mutex_init (lock); \ if (err == FALSE) \ err = errno; \ else \ err = 0; \ if (err) \ free (lock); \ else \ *priv = lock; \ } \ return err; \ } \ static int gcry_pth_mutex_destroy (void **lock) \ { /* GNU Pth has no destructor function. */ free (*lock); return 0; } \ static int gcry_pth_mutex_lock (void **lock) \ { return ((pth_mutex_acquire (*lock, 0, NULL)) == FALSE) \ ? errno : 0; } \ static int gcry_pth_mutex_unlock (void **lock) \ { return ((pth_mutex_release (*lock)) == FALSE) \ ? errno : 0; } \ static ssize_t gcry_pth_read (int fd, void *buf, size_t nbytes) \ { return pth_read (fd, buf, nbytes); } \ static ssize_t gcry_pth_write (int fd, const void *buf, size_t nbytes) \ { return pth_write (fd, buf, nbytes); } \ static ssize_t gcry_pth_select (int nfd, _GCRY_PTH_FD_SET *rset, \ _GCRY_PTH_FD_SET *wset, \ _GCRY_PTH_FD_SET *eset, \ struct timeval *timeout) \ { return pth_select (nfd, rset, wset, eset, timeout); } \ static ssize_t gcry_pth_waitpid (pid_t pid, int *status, int options) \ { return pth_waitpid (pid, status, options); } \ static int gcry_pth_accept (int s, _GCRY_PTH_SOCKADDR *addr, \ _GCRY_PTH_SOCKLEN_T *length_ptr) \ { return pth_accept (s, addr, length_ptr); } \ static int gcry_pth_connect (int s, _GCRY_PTH_SOCKADDR *addr, \ _GCRY_PTH_SOCKLEN_T length) \ { return pth_connect (s, addr, length); } \ \ /* FIXME: GNU Pth is missing pth_sendmsg and pth_recvmsg. */ \ static struct gcry_thread_cbs gcry_threads_pth = { GCRY_THREAD_OPTION_PTH, \ gcry_pth_init, gcry_pth_mutex_init, gcry_pth_mutex_destroy, \ gcry_pth_mutex_lock, gcry_pth_mutex_unlock, gcry_pth_read, gcry_pth_write, \ gcry_pth_select, gcry_pth_waitpid, gcry_pth_accept, gcry_pth_connect } #define GCRY_THREAD_OPTION_PTHREAD_IMPL \ static int gcry_pthread_mutex_init (void **priv) \ { \ int err = 0; \ pthread_mutex_t *lock = malloc (sizeof (pthread_mutex_t)); \ \ if (!lock) \ err = ENOMEM; \ if (!err) \ { \ err = pthread_mutex_init (lock, NULL); \ if (err) \ free (lock); \ else \ *priv = lock; \ } \ return err; \ } \ static int gcry_pthread_mutex_destroy (void **lock) \ { int err = pthread_mutex_destroy (*lock); free (*lock); return err; } \ static int gcry_pthread_mutex_lock (void **lock) \ { return pthread_mutex_lock (*lock); } \ static int gcry_pthread_mutex_unlock (void **lock) \ { return pthread_mutex_unlock (*lock); } \ \ static struct gcry_thread_cbs gcry_threads_pthread = \ { GCRY_THREAD_OPTION_PTHREAD, NULL, \ gcry_pthread_mutex_init, gcry_pthread_mutex_destroy, \ gcry_pthread_mutex_lock, gcry_pthread_mutex_unlock } /* The data object used to hold a multi precision integer. */ struct gcry_mpi; typedef struct gcry_mpi *gcry_mpi_t; typedef struct gcry_mpi *GCRY_MPI _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_mpi *GcryMPI _GCRY_GCC_ATTR_DEPRECATED; /* Check that the library fulfills the version requirement. */ const char *gcry_check_version (const char *req_version); /* Codes for function dispatchers. */ /* Codes used with the gcry_control function. */ enum gcry_ctl_cmds { GCRYCTL_SET_KEY = 1, GCRYCTL_SET_IV = 2, GCRYCTL_CFB_SYNC = 3, GCRYCTL_RESET = 4, /* e.g. for MDs */ GCRYCTL_FINALIZE = 5, GCRYCTL_GET_KEYLEN = 6, GCRYCTL_GET_BLKLEN = 7, GCRYCTL_TEST_ALGO = 8, GCRYCTL_IS_SECURE = 9, GCRYCTL_GET_ASNOID = 10, GCRYCTL_ENABLE_ALGO = 11, GCRYCTL_DISABLE_ALGO = 12, GCRYCTL_DUMP_RANDOM_STATS = 13, GCRYCTL_DUMP_SECMEM_STATS = 14, GCRYCTL_GET_ALGO_NPKEY = 15, GCRYCTL_GET_ALGO_NSKEY = 16, GCRYCTL_GET_ALGO_NSIGN = 17, GCRYCTL_GET_ALGO_NENCR = 18, GCRYCTL_SET_VERBOSITY = 19, GCRYCTL_SET_DEBUG_FLAGS = 20, GCRYCTL_CLEAR_DEBUG_FLAGS = 21, GCRYCTL_USE_SECURE_RNDPOOL= 22, GCRYCTL_DUMP_MEMORY_STATS = 23, GCRYCTL_INIT_SECMEM = 24, GCRYCTL_TERM_SECMEM = 25, GCRYCTL_DISABLE_SECMEM_WARN = 27, GCRYCTL_SUSPEND_SECMEM_WARN = 28, GCRYCTL_RESUME_SECMEM_WARN = 29, GCRYCTL_DROP_PRIVS = 30, GCRYCTL_ENABLE_M_GUARD = 31, GCRYCTL_START_DUMP = 32, GCRYCTL_STOP_DUMP = 33, GCRYCTL_GET_ALGO_USAGE = 34, GCRYCTL_IS_ALGO_ENABLED = 35, GCRYCTL_DISABLE_INTERNAL_LOCKING = 36, GCRYCTL_DISABLE_SECMEM = 37, GCRYCTL_INITIALIZATION_FINISHED = 38, GCRYCTL_INITIALIZATION_FINISHED_P = 39, GCRYCTL_ANY_INITIALIZATION_P = 40, GCRYCTL_SET_CBC_CTS = 41, GCRYCTL_SET_CBC_MAC = 42, GCRYCTL_SET_CTR = 43, GCRYCTL_ENABLE_QUICK_RANDOM = 44, GCRYCTL_SET_RANDOM_SEED_FILE = 45, GCRYCTL_UPDATE_RANDOM_SEED_FILE = 46, GCRYCTL_SET_THREAD_CBS = 47, GCRYCTL_FAST_POLL = 48 }; /* Perform various operations defined by CMD. */ gcry_error_t gcry_control (enum gcry_ctl_cmds CMD, ...); /* S-expression management. */ /* The object to represent an S-expression as used with the public key functions. */ struct gcry_sexp; typedef struct gcry_sexp *gcry_sexp_t; typedef struct gcry_sexp *GCRY_SEXP _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_sexp *GcrySexp _GCRY_GCC_ATTR_DEPRECATED; /* The possible values for the S-expression format. */ enum gcry_sexp_format { GCRYSEXP_FMT_DEFAULT = 0, GCRYSEXP_FMT_CANON = 1, GCRYSEXP_FMT_BASE64 = 2, GCRYSEXP_FMT_ADVANCED = 3 }; /* Create an new S-expression object from BUFFER of size LENGTH and return it in RETSEXP. With AUTODETECT set to 0 the data in BUFFER is expected to be in canonized format. */ gcry_error_t gcry_sexp_new (gcry_sexp_t *retsexp, const void *buffer, size_t length, int autodetect); /* Same as gcry_sexp_new but allows to pass a FREEFNC which has the effect to transfer ownership of BUFFER to the created object. */ gcry_error_t gcry_sexp_create (gcry_sexp_t *retsexp, void *buffer, size_t length, int autodetect, void (*freefnc) (void *)); /* Scan BUFFER and return a new S-expression object in RETSEXP. This function expects a printf like string in BUFFER. */ gcry_error_t gcry_sexp_sscan (gcry_sexp_t *retsexp, size_t *erroff, const char *buffer, size_t length); /* Same as gcry_sexp_sscan but expects a string in FORMAT and can thus only be used for certain encodings. */ gcry_error_t gcry_sexp_build (gcry_sexp_t *retsexp, size_t *erroff, const char *format, ...); /* Like gcry_sexp_build, but uses an array instead of variable function arguments. */ gcry_error_t gcry_sexp_build_array (gcry_sexp_t *retsexp, size_t *erroff, const char *format, void **arg_list); /* Release the S-expression object SEXP */ void gcry_sexp_release (gcry_sexp_t sexp); /* Calculate the length of an canonized S-expresion in BUFFER and check for a valid encoding. */ size_t gcry_sexp_canon_len (const unsigned char *buffer, size_t length, size_t *erroff, gcry_error_t *errcode); /* Copies the S-expression object SEXP into BUFFER using the format specified in MODE. */ size_t gcry_sexp_sprint (gcry_sexp_t sexp, int mode, char *buffer, size_t maxlength); /* Dumps the S-expression object A in a aformat suitable for debugging to Libgcrypt's logging stream. */ void gcry_sexp_dump (const gcry_sexp_t a); gcry_sexp_t gcry_sexp_cons (const gcry_sexp_t a, const gcry_sexp_t b); gcry_sexp_t gcry_sexp_alist (const gcry_sexp_t *array); gcry_sexp_t gcry_sexp_vlist (const gcry_sexp_t a, ...); gcry_sexp_t gcry_sexp_append (const gcry_sexp_t a, const gcry_sexp_t n); gcry_sexp_t gcry_sexp_prepend (const gcry_sexp_t a, const gcry_sexp_t n); /* Scan the S-expression for a sublist with a type (the car of the list) matching the string TOKEN. If TOKLEN is not 0, the token is assumed to be raw memory of this length. The function returns a newly allocated S-expression consisting of the found sublist or `NULL' when not found. */ gcry_sexp_t gcry_sexp_find_token (gcry_sexp_t list, const char *tok, size_t toklen); /* Return the length of the LIST. For a valid S-expression this should be at least 1. */ int gcry_sexp_length (const gcry_sexp_t list); /* Create and return a new S-expression from the element with index NUMBER in LIST. Note that the first element has the index 0. If there is no such element, `NULL' is returned. */ gcry_sexp_t gcry_sexp_nth (const gcry_sexp_t list, int number); /* Create and return a new S-expression from the first element in LIST; this called the "type" and should always exist and be a string. `NULL' is returned in case of a problem. */ gcry_sexp_t gcry_sexp_car (const gcry_sexp_t list); /* Create and return a new list form all elements except for the first one. Note, that this function may return an invalid S-expression because it is not guaranteed, that the type exists and is a string. However, for parsing a complex S-expression it might be useful for intermediate lists. Returns `NULL' on error. */ gcry_sexp_t gcry_sexp_cdr (const gcry_sexp_t list); gcry_sexp_t gcry_sexp_cadr (const gcry_sexp_t list); /* This function is used to get data from a LIST. A pointer to the actual data with index NUMBER is returned and the length of this data will be stored to DATALEN. If there is no data at the given index or the index represents another list, `NULL' is returned. *Note:* The returned pointer is valid as long as LIST is not modified or released. */ const char *gcry_sexp_nth_data (const gcry_sexp_t list, int number, size_t *datalen); /* This function is used to get and convert data from a LIST. This data is assumed to be an MPI stored in the format described by MPIFMT and returned as a standard Libgcrypt MPI. The caller must release this returned value using `gcry_mpi_release'. If there is no data at the given index, the index represents a list or the value can't be converted to an MPI, `NULL' is returned. */ gcry_mpi_t gcry_sexp_nth_mpi (gcry_sexp_t list, int number, int mpifmt); /******************************************* * * * multi precision integer functions * * * *******************************************/ /* Different formats of external big integer representation. */ enum gcry_mpi_format { GCRYMPI_FMT_NONE= 0, GCRYMPI_FMT_STD = 1, /* twos complement stored without length */ GCRYMPI_FMT_PGP = 2, /* As used by OpenPGP (only defined as unsigned)*/ GCRYMPI_FMT_SSH = 3, /* As used by SSH (same as 1 but with length)*/ GCRYMPI_FMT_HEX = 4, /* hex format */ GCRYMPI_FMT_USG = 5 /* like STD but this is an unsigned one */ }; /* Flags used for creating big integers. */ enum gcry_mpi_flag { GCRYMPI_FLAG_SECURE = 1, /* Allocate the number in "secure" memory. */ GCRYMPI_FLAG_OPAQUE = 2 /* The number is not a real one but just a way to store some bytes. This is useful for encrypted big integers. */ }; /* Allocate a new big integer object, initialize it with 0 and initially allocate memory for a number of at least NBITS. */ gcry_mpi_t gcry_mpi_new (unsigned int nbits); /* Same as gcry_mpi_new() but allocate in "secure" memory. */ gcry_mpi_t gcry_mpi_snew (unsigned int nbits); /* Release the number A and free all associated resources. */ void gcry_mpi_release (gcry_mpi_t a); /* Create a new number with the same value as A. */ gcry_mpi_t gcry_mpi_copy (const gcry_mpi_t a); /* Store the big integer value U in W. */ gcry_mpi_t gcry_mpi_set (gcry_mpi_t w, const gcry_mpi_t u); /* Store the unsigned integer value U in W. */ gcry_mpi_t gcry_mpi_set_ui (gcry_mpi_t w, unsigned long u); /* Swap the values of A and B. */ void gcry_mpi_swap (gcry_mpi_t a, gcry_mpi_t b); /* Compare the big integer number U and V returning 0 for equality, a positive value for U > V and a negative for U < V. */ int gcry_mpi_cmp (const gcry_mpi_t u, const gcry_mpi_t v); /* Compare the big integer number U with the unsigned integer V returning 0 for equality, a positive value for U > V and a negative for U < V. */ int gcry_mpi_cmp_ui (const gcry_mpi_t u, unsigned long v); /* Convert the external representation of an integer stored in BUFFER with a length of BUFLEN into a newly create MPI returned in RET_MPI. If NSCANNED is not NULL, it will receive the number of bytes actually scanned after a successful operation. */ gcry_error_t gcry_mpi_scan (gcry_mpi_t *ret_mpi, enum gcry_mpi_format format, const unsigned char *buffer, size_t buflen, size_t *nscanned); /* Convert the big integer A into the external representation described by FORMAT and store it in the provided BUFFER which has been allocated by the user with a size of BUFLEN bytes. NWRITTEN receives the actual length of the external representation unless it has been passed as NULL. */ gcry_error_t gcry_mpi_print (enum gcry_mpi_format format, unsigned char *buffer, size_t buflen, size_t *nwritten, const gcry_mpi_t a); /* Convert the big integer A int the external representation described by FORMAT and store it in a newly allocated buffer which address will be put into BUFFER. NWRITTEN receives the actual lengths of the external representation. */ gcry_error_t gcry_mpi_aprint (enum gcry_mpi_format format, unsigned char **buffer, size_t *nwritten, const gcry_mpi_t a); /* Dump the value of A in a format suitable for debugging to Libgcrypt's logging stream. Note that one leading space but no trailing space or linefeed will be printed. It is okay to pass NULL for A. */ void gcry_mpi_dump (const gcry_mpi_t a); /* W = U + V. */ void gcry_mpi_add (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U + V. V is an unsigned integer. */ void gcry_mpi_add_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v); /* W = U + V mod M. */ void gcry_mpi_addm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U - V. */ void gcry_mpi_sub (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U - V. V is an unsigned integer. */ void gcry_mpi_sub_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v ); /* W = U - V mod M */ void gcry_mpi_subm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U * V. */ void gcry_mpi_mul (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U * V. V is an unsigned integer. */ void gcry_mpi_mul_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v ); /* W = U * V mod M. */ void gcry_mpi_mulm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U * (2 ^ CNT). */ void gcry_mpi_mul_2exp (gcry_mpi_t w, gcry_mpi_t u, unsigned long cnt); /* Q = DIVIDEND / DIVISOR, R = DIVIDEND % DIVISOR, Q or R may be passed as NULL. ROUND should be negative or 0. */ void gcry_mpi_div (gcry_mpi_t q, gcry_mpi_t r, gcry_mpi_t dividend, gcry_mpi_t divisor, int round); /* R = DIVIDEND % DIVISOR */ void gcry_mpi_mod (gcry_mpi_t r, gcry_mpi_t dividend, gcry_mpi_t divisor); /* W = B ^ E mod M. */ void gcry_mpi_powm (gcry_mpi_t w, const gcry_mpi_t b, const gcry_mpi_t e, const gcry_mpi_t m); /* Set G to the greatest common divisor of A and B. Return true if the G is 1. */ int gcry_mpi_gcd (gcry_mpi_t g, gcry_mpi_t a, gcry_mpi_t b); /* Set X to the multiplicative inverse of A mod M. Return true if the value exists. */ int gcry_mpi_invm (gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t m); /* Return the number of bits required to represent A. */ unsigned int gcry_mpi_get_nbits (gcry_mpi_t a); /* Return true when bit number N (counting from 0) is set in A. */ int gcry_mpi_test_bit (gcry_mpi_t a, unsigned int n); /* Set bit number N in A. */ void gcry_mpi_set_bit (gcry_mpi_t a, unsigned int n); /* Clear bit number N in A. */ void gcry_mpi_clear_bit (gcry_mpi_t a, unsigned int n); /* Set bit number N in A and clear all bits greater than N. */ void gcry_mpi_set_highbit (gcry_mpi_t a, unsigned int n); /* Clear bit number N in A and all bits greater than N. */ void gcry_mpi_clear_highbit (gcry_mpi_t a, unsigned int n); /* Shift the value of A by N bits to the right and store the result in X. */ void gcry_mpi_rshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n); /* Store NBITS of the value P points to in A and mark A as an opaque value. WARNING: Never use an opaque MPI for anything thing else then gcry_mpi_release, gcry_mpi_get_opaque. */ gcry_mpi_t gcry_mpi_set_opaque (gcry_mpi_t a, void *p, unsigned int nbits); /* Return a pointer to an opaque value stored in A and return its size in NBITS. Note that the returned pointer is still owned by A and that the function should never be used for an non-opaque MPI. */ void *gcry_mpi_get_opaque (gcry_mpi_t a, unsigned int *nbits); /* Set the FLAG for the big integer A. Currently only the flag GCRYMPI_FLAG_SECURE is allowed to convert A into an big intger stored in "secure" memory. */ void gcry_mpi_set_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Clear FLAG for the big integer A. Note that this function is currently useless as no flags are allowed. */ void gcry_mpi_clear_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Return true when the FLAG is set for A. */ int gcry_mpi_get_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Unless the GCRYPT_NO_MPI_MACROS is used, provide a couple of convenience macors for the big integer functions. */ #ifndef GCRYPT_NO_MPI_MACROS #define mpi_new(n) gcry_mpi_new( (n) ) #define mpi_secure_new( n ) gcry_mpi_snew( (n) ) #define mpi_release(a) \ do \ { \ gcry_mpi_release ((a)); \ (a) = NULL; \ } \ while (0) #define mpi_copy( a ) gcry_mpi_copy( (a) ) #define mpi_set( w, u) gcry_mpi_set( (w), (u) ) #define mpi_set_ui( w, u) gcry_mpi_set_ui( (w), (u) ) #define mpi_cmp( u, v ) gcry_mpi_cmp( (u), (v) ) #define mpi_cmp_ui( u, v ) gcry_mpi_cmp_ui( (u), (v) ) #define mpi_add_ui(w,u,v) gcry_mpi_add_ui((w),(u),(v)) #define mpi_add(w,u,v) gcry_mpi_add ((w),(u),(v)) #define mpi_addm(w,u,v,m) gcry_mpi_addm ((w),(u),(v),(m)) #define mpi_sub_ui(w,u,v) gcry_mpi_sub_ui ((w),(u),(v)) #define mpi_sub(w,u,v) gcry_mpi_sub ((w),(u),(v)) #define mpi_subm(w,u,v,m) gcry_mpi_subm ((w),(u),(v),(m)) #define mpi_mul_ui(w,u,v) gcry_mpi_mul_ui ((w),(u),(v)) #define mpi_mul_2exp(w,u,v) gcry_mpi_mul_2exp ((w),(u),(v)) #define mpi_mul(w,u,v) gcry_mpi_mul ((w),(u),(v)) #define mpi_mulm(w,u,v,m) gcry_mpi_mulm ((w),(u),(v),(m)) #define mpi_powm(w,b,e,m) gcry_mpi_powm ( (w), (b), (e), (m) ) #define mpi_tdiv(q,r,a,m) gcry_mpi_div ( (q), (r), (a), (m), 0) #define mpi_fdiv(q,r,a,m) gcry_mpi_div ( (q), (r), (a), (m), -1) #define mpi_mod(r,a,m) gcry_mpi_mod ((r), (a), (m)) #define mpi_gcd(g,a,b) gcry_mpi_gcd ( (g), (a), (b) ) #define mpi_invm(g,a,b) gcry_mpi_invm ( (g), (a), (b) ) #define mpi_get_nbits(a) gcry_mpi_get_nbits ((a)) #define mpi_test_bit(a,b) gcry_mpi_test_bit ((a),(b)) #define mpi_set_bit(a,b) gcry_mpi_set_bit ((a),(b)) #define mpi_set_highbit(a,b) gcry_mpi_set_highbit ((a),(b)) #define mpi_clear_bit(a,b) gcry_mpi_clear_bit ((a),(b)) #define mpi_clear_highbit(a,b) gcry_mpi_clear_highbit ((a),(b)) #define mpi_rshift(a,b,c) gcry_mpi_rshift ((a),(b),(c)) #define mpi_set_opaque(a,b,c) gcry_mpi_set_opaque( (a), (b), (c) ) #define mpi_get_opaque(a,b) gcry_mpi_get_opaque( (a), (b) ) #endif /* GCRYPT_NO_MPI_MACROS */ /************************************ * * * symmetric cipher functions * * * ************************************/ /* The data object used to hold a handle to an encryption object. */ struct gcry_cipher_handle; typedef struct gcry_cipher_handle *gcry_cipher_hd_t; typedef struct gcry_cipher_handle *GCRY_CIPHER_HD _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_cipher_handle *GcryCipherHd _GCRY_GCC_ATTR_DEPRECATED; /* All symmetric encryption algorithms are identified by their IDs. More IDs may be registered at runtime. */ enum gcry_cipher_algos { GCRY_CIPHER_NONE = 0, GCRY_CIPHER_IDEA = 1, GCRY_CIPHER_3DES = 2, GCRY_CIPHER_CAST5 = 3, GCRY_CIPHER_BLOWFISH = 4, GCRY_CIPHER_SAFER_SK128 = 5, GCRY_CIPHER_DES_SK = 6, GCRY_CIPHER_AES = 7, GCRY_CIPHER_AES192 = 8, GCRY_CIPHER_AES256 = 9, GCRY_CIPHER_TWOFISH = 10, /* Other cipher numbers are above 300 for OpenPGP reasons. */ GCRY_CIPHER_ARCFOUR = 301, /* Fully compatible with RSA's RC4 (tm). */ GCRY_CIPHER_DES = 302, /* Yes, this is single key 56 bit DES. */ GCRY_CIPHER_TWOFISH128 = 303, GCRY_CIPHER_SERPENT128 = 304, GCRY_CIPHER_SERPENT192 = 305, GCRY_CIPHER_SERPENT256 = 306, GCRY_CIPHER_RFC2268_40 = 307, /* Ron's Cipher 2 (40 bit). */ GCRY_CIPHER_RFC2268_128 = 308 /* Ron's Cipher 2 (128 bit). */ }; /* The Rijndael algorithm is basically AES, so provide some macros. */ #define GCRY_CIPHER_AES128 GCRY_CIPHER_AES #define GCRY_CIPHER_RIJNDAEL GCRY_CIPHER_AES #define GCRY_CIPHER_RIJNDAEL128 GCRY_CIPHER_AES128 #define GCRY_CIPHER_RIJNDAEL192 GCRY_CIPHER_AES192 #define GCRY_CIPHER_RIJNDAEL256 GCRY_CIPHER_AES256 /* The supported encryption modes. Note that not all of them are supported for each algorithm. */ enum gcry_cipher_modes { GCRY_CIPHER_MODE_NONE = 0, /* Not yet specified. */ GCRY_CIPHER_MODE_ECB = 1, /* Electronic codebook. */ GCRY_CIPHER_MODE_CFB = 2, /* Cipher feedback. */ GCRY_CIPHER_MODE_CBC = 3, /* Cipher block chaining. */ GCRY_CIPHER_MODE_STREAM = 4, /* Used with stream ciphers. */ GCRY_CIPHER_MODE_OFB = 5, /* Outer feedback. */ GCRY_CIPHER_MODE_CTR = 6 /* Counter. */ }; /* Flags used with the open function. */ enum gcry_cipher_flags { GCRY_CIPHER_SECURE = 1, /* Allocate in secure memory. */ GCRY_CIPHER_ENABLE_SYNC = 2, /* Enable CFB sync mode. */ GCRY_CIPHER_CBC_CTS = 4, /* Enable CBC cipher text stealing (CTS). */ GCRY_CIPHER_CBC_MAC = 8 /* Enable CBC message auth. code (MAC). */ }; /* Create a handle for algorithm ALGO to be used in MODE. FLAGS may be given as an bitwise OR of the gcry_cipher_flags values. */ gcry_error_t gcry_cipher_open (gcry_cipher_hd_t *handle, int algo, int mode, unsigned int flags); /* Close the cioher handle H and release all resource. */ void gcry_cipher_close (gcry_cipher_hd_t h); /* Perform various operations on the cipher object H. */ gcry_error_t gcry_cipher_ctl (gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen); /* Retrieve various information about the cipher object H. */ gcry_error_t gcry_cipher_info (gcry_cipher_hd_t h, int what, void *buffer, size_t *nbytes); /* Retrieve various information about the cipher algorithm ALGO. */ gcry_error_t gcry_cipher_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the cipher algorithm id ALGO to a string representation of that algorithm name. For unknown algorithms this functions returns an empty string. */ const char *gcry_cipher_algo_name (int algo) _GCRY_GCC_ATTR_PURE; /* Map the algorithm name NAME to an cipher algorithm ID. Return 0 if the algorithm name is not known. */ int gcry_cipher_map_name (const char *name) _GCRY_GCC_ATTR_PURE; /* Given an ASN.1 object identifier in standard IETF dotted decimal format in STRING, return the encryption mode associated with that OID or 0 if not known or applicable. */ int gcry_cipher_mode_from_oid (const char *string) _GCRY_GCC_ATTR_PURE; /* Encrypt the plaintext of size INLEN in IN using the cipher handle H into the buffer OUT which has an allocated length of OUTSIZE. For most algorithms it is possible to pass NULL for in and 0 for INLEN and do a in-place decryption of the data provided in OUT. */ gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h, unsigned char *out, size_t outsize, const unsigned char *in, size_t inlen); /* The counterpart to gcry_cipher_encrypt. */ gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t h, unsigned char *out, size_t outsize, const unsigned char *in, size_t inlen); /* Set key K of length L for the cipher handle H. (We have to cast away a const char* here - this catch-all ctl function was probably not the best choice) */ #define gcry_cipher_setkey(h,k,l) gcry_cipher_ctl( (h), GCRYCTL_SET_KEY, \ (char*)(k), (l) ) /* Set initialization vector K of length L for the cipher handle H. */ #define gcry_cipher_setiv(h,k,l) gcry_cipher_ctl( (h), GCRYCTL_SET_IV, \ (char*)(k), (l) ) /* Reset the handle to the state after open. */ #define gcry_cipher_reset(h) gcry_cipher_ctl ((h), GCRYCTL_RESET, NULL, 0) /* Perform the the OpenPGP sync operation if this is enabled for the cipher handle H. */ #define gcry_cipher_sync(h) gcry_cipher_ctl( (h), GCRYCTL_CFB_SYNC, \ NULL, 0 ) /* Enable or disable CTS in future calls to gcry_encrypt(). CBC mode only. */ #define gcry_cipher_cts(h,on) gcry_cipher_ctl( (h), GCRYCTL_SET_CBC_CTS, \ NULL, on ) /* Set counter for CTR mode. (K,L) must denote a buffer of block size length, or (NULL,0) to set the CTR to the all-zero block. */ #define gcry_cipher_setctr(h,k,l) gcry_cipher_ctl( (h), GCRYCTL_SET_CTR, \ (char*)(k), (l) ) /* Retrieved the key length used with algorithm A. */ size_t gcry_cipher_get_algo_keylen (int algo); /* Retrieve the block length used with algorithm A. */ size_t gcry_cipher_get_algo_blklen (int algo); /* Return 0 if the algorithm A is available for use. */ #define gcry_cipher_test_algo(a) \ gcry_cipher_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /* Get a list consisting of the IDs of the loaded cipher modules. If LIST is zero, write the number of loaded cipher modules to LIST_LENGTH and return. If LIST is non-zero, the first *LIST_LENGTH algorithm IDs are stored in LIST, which must be of according size. In case there are less cipher modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. */ gcry_error_t gcry_cipher_list (int *list, int *list_length); /************************************ * * * asymmetric cipher functions * * * ************************************/ /* The algorithms and their IDs we support. */ enum gcry_pk_algos { GCRY_PK_RSA = 1, GCRY_PK_RSA_E = 2, /* deprecated */ GCRY_PK_RSA_S = 3, /* deprecated */ GCRY_PK_ELG_E = 16, /* use only for OpenPGP */ GCRY_PK_DSA = 17, GCRY_PK_ELG = 20 }; /* Flags describing usage capabilities of a PK algorithm. */ #define GCRY_PK_USAGE_SIGN 1 #define GCRY_PK_USAGE_ENCR 2 /* Encrypt the DATA using the public key PKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_encrypt (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t pkey); /* Decrypt the DATA using the private key SKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_decrypt (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t skey); /* Sign the DATA using the private key SKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_sign (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t skey); /* Check the signature SIGVAL on DATA using the public key PKEY. */ gcry_error_t gcry_pk_verify (gcry_sexp_t sigval, gcry_sexp_t data, gcry_sexp_t pkey); /* Check that private KEY is sane. */ gcry_error_t gcry_pk_testkey (gcry_sexp_t key); /* Generate a new key pair according to the parameters given in S_PARMS. The new key pair is returned in as an S-expression in R_KEY. */ gcry_error_t gcry_pk_genkey (gcry_sexp_t *r_key, gcry_sexp_t s_parms); /* Catch all function for miscellaneous operations. */ gcry_error_t gcry_pk_ctl (int cmd, void *buffer, size_t buflen); /* Retrieve information about the public key algorithm ALGO. */ gcry_error_t gcry_pk_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the public key algorithm id ALGO to a string representation of the algorithm name. For unknown algorithms this functions returns an empty string. */ const char *gcry_pk_algo_name (int algo) _GCRY_GCC_ATTR_PURE; /* Map the algorithm NAME to a public key algorithm Id. Return 0 if the algorithm name is not known. */ int gcry_pk_map_name (const char* name) _GCRY_GCC_ATTR_PURE; /* Return what is commonly referred as the key length for the given public or private KEY. */ unsigned int gcry_pk_get_nbits (gcry_sexp_t key) _GCRY_GCC_ATTR_PURE; /* Please note that keygrip is still experimental and should not be used without contacting the author. */ unsigned char *gcry_pk_get_keygrip (gcry_sexp_t key, unsigned char *array); /* Return 0 if the public key algorithm A is available for use. */ #define gcry_pk_test_algo(a) \ gcry_pk_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /* Get a list consisting of the IDs of the loaded pubkey modules. If LIST is zero, write the number of loaded pubkey modules to LIST_LENGTH and return. If LIST is non-zero, the first *LIST_LENGTH algorithm IDs are stored in LIST, which must be of according size. In case there are less pubkey modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. */ gcry_error_t gcry_pk_list (int *list, int *list_length); /* Alternative interface for asymetric cryptography. */ /* The algorithm IDs. */ typedef enum gcry_ac_id { GCRY_AC_RSA = 1, GCRY_AC_DSA = 17, GCRY_AC_ELG = 20, GCRY_AC_ELG_E = 16 } gcry_ac_id_t; /* Key types. */ typedef enum gcry_ac_key_type { GCRY_AC_KEY_SECRET, GCRY_AC_KEY_PUBLIC } gcry_ac_key_type_t; /* AC data. */ #define GCRY_AC_FLAG_DEALLOC (1 << 0) #define GCRY_AC_FLAG_COPY (1 << 1) #define GCRY_AC_FLAG_NO_BLINDING (1 << 2) /* This type represents a `data set'. */ typedef struct gcry_ac_data *gcry_ac_data_t; /* This type represents a single `key', either a secret one or a public one. */ typedef struct gcry_ac_key *gcry_ac_key_t; /* This type represents a `key pair' containing a secret and a public key. */ typedef struct gcry_ac_key_pair *gcry_ac_key_pair_t; /* This type represents a `handle' that is needed by functions performing cryptographic operations. */ typedef struct gcry_ac_handle *gcry_ac_handle_t; /* The caller of gcry_ac_key_pair_generate can provide one of these structures in order to influence the key generation process in an algorithm-specific way. */ typedef struct gcry_ac_key_spec_rsa { gcry_mpi_t e; /* E to use. */ } gcry_ac_key_spec_rsa_t; /* Returns a new, empty data set in DATA. */ gcry_error_t gcry_ac_data_new (gcry_ac_data_t *data); /* Destroy the data set DATA. */ void gcry_ac_data_destroy (gcry_ac_data_t data); /* Create a copy of the data set DATA and store it in DATA_CP. */ gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *data_cp, gcry_ac_data_t data); /* Return the number of named MPI values inside of the data set DATA. */ unsigned int gcry_ac_data_length (gcry_ac_data_t data); /* Destroy any values contained in the data set DATA. */ void gcry_ac_data_clear (gcry_ac_data_t data); /* Add the value MPI to DATA with the label NAME. If FLAGS contains GCRY_AC_FLAG_DATA_COPY, the data set will contain copies of NAME and MPI. If FLAGS contains GCRY_AC_FLAG_DATA_DEALLOC or GCRY_AC_FLAG_DATA_COPY, the values contained in the data set will be deallocated when they are to be removed from the data set. */ gcry_error_t gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags, const char *name, gcry_mpi_t mpi); /* Store the value labelled with NAME found in DATA in MPI. If FLAGS contains GCRY_AC_FLAG_COPY, store a copy of the MPI value contained in the data set. MPI may be NULL. */ gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags, const char *name, gcry_mpi_t *mpi); /* Stores in NAME and MPI the named MPI value contained in the data set DATA with the index IDX. If FLAGS contains GCRY_AC_FLAG_COPY, store copies of the values contained in the data set. NAME or MPI may be NULL. */ gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags, unsigned int idx, const char **name, gcry_mpi_t *mpi); /* Create a new ac handle. */ gcry_error_t gcry_ac_open (gcry_ac_handle_t *handle, gcry_ac_id_t algorithm, unsigned int flags); /* Destroy an ac handle. */ void gcry_ac_close (gcry_ac_handle_t handle); /* Initialize a key from a given data set. */ gcry_error_t gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle, gcry_ac_key_type_t type, gcry_ac_data_t data); /* Generates a new key pair via the handle HANDLE of NBITS bits and stores it in KEY_PAIR. In case non-standard settings are wanted, a pointer to a structure of type gcry_ac_key_spec__t, matching the selected algorithm, can be given as KEY_SPEC. MISC_DATA is not used yet. */ gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t handle, unsigned int nbits, void *spec, gcry_ac_key_pair_t *key_pair, gcry_mpi_t **misc_data); /* Returns the key of type WHICH out of the key pair KEY_PAIR. */ gcry_ac_key_t gcry_ac_key_pair_extract (gcry_ac_key_pair_t key_pair, gcry_ac_key_type_t which); /* Returns the data set contained in the key KEY. */ gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t key); /* Verifies that the key KEY is sane via HANDLE. */ gcry_error_t gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key); /* Stores the number of bits of the key KEY in NBITS via HANDLE. */ gcry_error_t gcry_ac_key_get_nbits (gcry_ac_handle_t handle, gcry_ac_key_t key, unsigned int *nbits); /* Writes the 20 byte long key grip of the key KEY to KEY_GRIP via HANDLE. */ gcry_error_t gcry_ac_key_get_grip (gcry_ac_handle_t handle, gcry_ac_key_t key, unsigned char *key_grip); /* Destroy a key. */ void gcry_ac_key_destroy (gcry_ac_key_t key); /* Destroy a key pair. */ void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair); /* Encrypt the plain text MPI value DATA_PLAIN with the key KEY under the control of the flags FLAGS and store the resulting data set into DATA_ENCRYPTED. */ gcry_error_t gcry_ac_data_encrypt (gcry_ac_handle_t handle, unsigned int flags, gcry_ac_key_t key, gcry_mpi_t data_plain, gcry_ac_data_t *data_encrypted); /* Decrypt the decrypted data contained in the data set DATA_ENCRYPTED with the key KEY under the control of the flags FLAGS and store the resulting plain text MPI value in DATA_PLAIN. */ gcry_error_t gcry_ac_data_decrypt (gcry_ac_handle_t handle, unsigned int flags, gcry_ac_key_t key, gcry_mpi_t *data_plain, gcry_ac_data_t data_encrypted); /* Sign the data contained in DATA with the key KEY and store the resulting signature in the data set DATA_SIGNATURE. */ gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t handle, gcry_ac_key_t key, gcry_mpi_t data, gcry_ac_data_t *data_signature); /* Verify that the signature contained in the data set DATA_SIGNATURE is indeed the result of signing the data contained in DATA with the secret key belonging to the public key KEY. */ gcry_error_t gcry_ac_data_verify (gcry_ac_handle_t handle, gcry_ac_key_t key, gcry_mpi_t data, gcry_ac_data_t data_signature); /* Store the textual representation of the algorithm whose id is given in ALGORITHM in NAME. */ gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t algorithm, const char **name); /* Store the numeric ID of the algorithm whose textual representation is contained in NAME in ALGORITHM. */ gcry_error_t gcry_ac_name_to_id (const char *name, gcry_ac_id_t *algorithm); /************************************ * * * cryptograhic hash functions * * * ************************************/ /* Algorithm IDs for the hash functions we know about. Not all of them are implemnted. */ enum gcry_md_algos { GCRY_MD_NONE = 0, GCRY_MD_MD5 = 1, GCRY_MD_SHA1 = 2, GCRY_MD_RMD160 = 3, GCRY_MD_MD2 = 5, GCRY_MD_TIGER = 6, /* TIGER/192. */ GCRY_MD_HAVAL = 7, /* HAVAL, 5 pass, 160 bit. */ GCRY_MD_SHA256 = 8, GCRY_MD_SHA384 = 9, GCRY_MD_SHA512 = 10, GCRY_MD_MD4 = 301, GCRY_MD_CRC32 = 302, GCRY_MD_CRC32_RFC1510 = 303, GCRY_MD_CRC24_RFC2440 = 304 }; /* Flags used with the open function. */ enum gcry_md_flags { GCRY_MD_FLAG_SECURE = 1, /* Allocate all buffers in "secure" memory. */ GCRY_MD_FLAG_HMAC = 2 /* Make an HMAC out of this algorithm. */ }; /* Forward declaration. */ struct gcry_md_context; /* This object is used to hold a handle to a message digest object. This structure is private - only to be used by the public gcry_md_* macros. */ typedef struct gcry_md_handle { /* Actual context. */ struct gcry_md_context *ctx; /* Buffer management. */ int bufpos; int bufsize; unsigned char buf[1]; } *gcry_md_hd_t; /* Compatibility types, do not use them. */ typedef struct gcry_md_handle *GCRY_MD_HD _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_md_handle *GcryMDHd _GCRY_GCC_ATTR_DEPRECATED; /* Create a message digest object for algorithm ALGO. FLAGS may be given as an bitwise OR of the gcry_md_flags values. ALGO may be given as 0 if the algorithms to be used are later set using gcry_md_enable. */ gcry_error_t gcry_md_open (gcry_md_hd_t *h, int algo, unsigned int flags); /* Release the message digest object HD. */ void gcry_md_close (gcry_md_hd_t hd); /* Add the message digest algorithm ALGO to the digest object HD. */ gcry_error_t gcry_md_enable (gcry_md_hd_t hd, int algo); /* Create a new digest object as an exact copy of the object HD. */ gcry_error_t gcry_md_copy (gcry_md_hd_t *bhd, gcry_md_hd_t ahd); /* Reset the digest object HD to its initial state. */ void gcry_md_reset (gcry_md_hd_t hd); /* Perform various operations on the digets object HD. */ gcry_error_t gcry_md_ctl (gcry_md_hd_t hd, int cmd, unsigned char *buffer, size_t buflen); /* Pass LENGTH bytes of data in BUFFER to the digest object HD so that it can update the digest values. This is the actual hash function. */ void gcry_md_write (gcry_md_hd_t hd, const void *buffer, size_t length); /* Read out the final digest from HD return the digest value for algorithm ALGO. */ unsigned char *gcry_md_read (gcry_md_hd_t hd, int algo); /* Convenience function to calculate the hash from the data in BUFFER of size LENGTH using the algorithm ALGO avoiding the creating of a hash object. The hash is returned in the caller provided buffer DIGEST which must be large enough to hold the digest of the given algorithm. */ void gcry_md_hash_buffer (int algo, void *digest, const void *buffer, size_t length); /* Retrieve the algorithm used with HD. This does not work reliable if more than one algorithm is enabled in HD. */ int gcry_md_get_algo (gcry_md_hd_t hd); /* Retrieve the length in bytes of the digest yielded by algorithm ALGO. */ unsigned int gcry_md_get_algo_dlen (int algo); /* Return true if the the algorithm ALGO is enabled in the digest object A. */ int gcry_md_is_enabled (gcry_md_hd_t a, int algo); /* Return true if the digest object A is allocated in "secure" memory. */ int gcry_md_is_secure (gcry_md_hd_t a); /* Retrieve various information about the object H. */ gcry_error_t gcry_md_info (gcry_md_hd_t h, int what, void *buffer, size_t *nbytes); /* Retrieve various information about the algorithm ALGO. */ gcry_error_t gcry_md_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the digest algorithm id ALGO to a string representation of the algorithm name. For unknown algorithms this functions returns an empty string. */ const char *gcry_md_algo_name (int algo) _GCRY_GCC_ATTR_PURE; /* Map the algorithm NAME to a digest algorithm Id. Return 0 if the algorithm name is not known. */ int gcry_md_map_name (const char* name) _GCRY_GCC_ATTR_PURE; /* For use with the HMAC feature, the set MAC key to the KEY of KEYLEN. */ gcry_error_t gcry_md_setkey (gcry_md_hd_t hd, const void *key, size_t keylen); /* Update the hash(s) of H with the character C. This is a buffered version of the gcry_md_write function. */ #define gcry_md_putc(h,c) \ do { \ gcry_md_hd_t h__ = (h); \ if( (h__)->bufpos == (h__)->bufsize ) \ gcry_md_write( (h__), NULL, 0 ); \ (h__)->buf[(h__)->bufpos++] = (c) & 0xff; \ } while(0) /* Finalize the digest calculation. This is not really needed because gcry_md_read() does this implicitly. */ #define gcry_md_final(a) \ gcry_md_ctl ((a), GCRYCTL_FINALIZE, NULL, 0) /* Return 0 if the algorithm A is available for use. */ #define gcry_md_test_algo(a) \ gcry_md_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /* Return an DER encoded ASN.1 OID for the algorithm A in buffer B. N must point to size_t variable with the available size of buffer B. After return it will receive the actual size of the returned OID. */ #define gcry_md_get_asnoid(a,b,n) \ gcry_md_algo_info((a), GCRYCTL_GET_ASNOID, (b), (n)) /* Enable debugging for digets object A; i.e. create files named dbgmd-. while hashing. B is a string used as the suffix for the filename. */ #define gcry_md_start_debug(a,b) \ gcry_md_ctl( (a), GCRYCTL_START_DUMP, (b), 0 ) /* Disable the debugging of A. */ #define gcry_md_stop_debug(a,b) \ gcry_md_ctl( (a), GCRYCTL_STOP_DUMP, (b), 0 ) /* Get a list consisting of the IDs of the loaded message digest modules. If LIST is zero, write the number of loaded message digest modules to LIST_LENGTH and return. If LIST is non-zero, the first *LIST_LENGTH algorithm IDs are stored in LIST, which must be of according size. In case there are less message digest modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. */ gcry_error_t gcry_md_list (int *list, int *list_length); /************************************ * * * random generating functions * * * ************************************/ /* The possible values for the random quality. The rule of thumb is to use STRONG for session keys and VERY_STRONG for key material. WEAK is currently an alias for STRONG and should not be used anymore - use gcry_create_nonce instead. */ typedef enum gcry_random_level { GCRY_WEAK_RANDOM = 0, GCRY_STRONG_RANDOM = 1, GCRY_VERY_STRONG_RANDOM = 2 } gcry_random_level_t; /* Fill BUFFER with LENGTH bytes of random, using random numbers of quality LEVEL. */ void gcry_randomize (unsigned char *buffer, size_t length, enum gcry_random_level level); /* Add the external random from BUFFER with LENGTH bytes into the pool. QUALITY should either be -1 for unknown or in the range of 0 to 100 */ gcry_error_t gcry_random_add_bytes (const void *buffer, size_t length, int quality); /* If random numbers are used in an application, this macro should be called from time to time so that new stuff gets added to the internal pool of the RNG. */ #define gcry_fast_random_poll() gcry_control (GCRYCTL_FAST_POLL, NULL) /* Return NBYTES of allocated random using a random numbers of quality LEVEL. */ void *gcry_random_bytes (size_t nbytes, enum gcry_random_level level) _GCRY_GCC_ATTR_MALLOC; /* Return NBYTES of allocated random using a random numbers of quality LEVEL. The random numbers are created returned in "secure" memory. */ void *gcry_random_bytes_secure (size_t nbytes, enum gcry_random_level level) _GCRY_GCC_ATTR_MALLOC; /* Set the big integer W to a random value of NBITS using a random generator with quality LEVEL. */ void gcry_mpi_randomize (gcry_mpi_t w, unsigned int nbits, enum gcry_random_level level); /* Create an unpredicable nonce of LENGTH bytes in BUFFER. */ void gcry_create_nonce (unsigned char *buffer, size_t length); /* Prime interface. */ /* Mode values passed to a gcry_prime_check_func_t. */ #define GCRY_PRIME_CHECK_AT_FINISH 0 #define GCRY_PRIME_CHECK_AT_GOT_PRIME 1 #define GCRY_PRIME_CHECK_AT_MAYBE_PRIME 2 /* The function should return 1 if the operation shall continue, 0 to reject the prime candidate. */ typedef int (*gcry_prime_check_func_t) (void *arg, int mode, gcry_mpi_t candidate); /* Flags for gcry_prime_generate(): */ /* Allocate prime numbers and factors in secure memory. */ #define GCRY_PRIME_FLAG_SECRET (1 << 0) /* Make sure that at least one prime factor is of size `FACTOR_BITS'. */ #define GCRY_PRIME_FLAG_SPECIAL_FACTOR (1 << 1) /* Generate a new prime number of PRIME_BITS bits and store it in PRIME. If FACTOR_BITS is non-zero, one of the prime factors of (prime - 1) / 2 must be FACTOR_BITS bits long. If FACTORS is non-zero, allocate a new, NULL-terminated array holding the prime factors and store it in FACTORS. FLAGS might be used to influence the prime number generation process. */ gcry_error_t gcry_prime_generate (gcry_mpi_t *prime, unsigned int prime_bits, unsigned int factor_bits, gcry_mpi_t **factors, gcry_prime_check_func_t cb_func, void *cb_arg, gcry_random_level_t random_level, unsigned int flags); /* Find a generator for PRIME where the factorization of (prime-1) is in the NULL terminated array FACTORS. Return the generator as a newly allocated MPI in R_G. If START_G is not NULL, use this as teh start for the search. */ gcry_error_t gcry_prime_group_generator (gcry_mpi_t *r_g, gcry_mpi_t prime, gcry_mpi_t *factors, gcry_mpi_t start_g); /* Convenience function to release the FACTORS array. */ void gcry_prime_release_factors (gcry_mpi_t *factors); /* Check wether the number X is prime. */ gcry_error_t gcry_prime_check (gcry_mpi_t x, unsigned int flags); /************************************ * * * miscellaneous stuff * * * ************************************/ /* Log levels used by the internal logging facility. */ enum gcry_log_levels { GCRY_LOG_CONT = 0, /* continue the last log line */ GCRY_LOG_INFO = 10, GCRY_LOG_WARN = 20, GCRY_LOG_ERROR = 30, GCRY_LOG_FATAL = 40, GCRY_LOG_BUG = 50, GCRY_LOG_DEBUG = 100 }; /* Type for progress handlers. */ typedef void (*gcry_handler_progress_t) (void *, const char *, int, int, int); /* Type for memory allocation handlers. */ typedef void *(*gcry_handler_alloc_t) (size_t n); /* Type for secure memory check handlers. */ typedef int (*gcry_handler_secure_check_t) (const void *); /* Type for memory reallocation handlers. */ typedef void *(*gcry_handler_realloc_t) (void *p, size_t n); /* Type for memory free handlers. */ typedef void (*gcry_handler_free_t) (void *); /* Type for out-of-memory handlers. */ typedef int (*gcry_handler_no_mem_t) (void *, size_t, unsigned int); /* Type for fatal error handlers. */ typedef void (*gcry_handler_error_t) (void *, int, const char *); /* Type for logging handlers. */ typedef void (*gcry_handler_log_t) (void *, int, const char *, va_list); /* Certain operations can provide progress information. This function is used to register a handler for retrieving these information. */ void gcry_set_progress_handler (gcry_handler_progress_t cb, void *cb_data); /* Register a custom memory allocation functions. */ void gcry_set_allocation_handler ( gcry_handler_alloc_t func_alloc, gcry_handler_alloc_t func_alloc_secure, gcry_handler_secure_check_t func_secure_check, gcry_handler_realloc_t func_realloc, gcry_handler_free_t func_free); /* Register a function used instead of the internal out of memory handler. */ void gcry_set_outofcore_handler (gcry_handler_no_mem_t h, void *opaque); /* Register a function used instead of the internal fatal error handler. */ void gcry_set_fatalerror_handler (gcry_handler_error_t fnc, void *opaque); /* Register a function used instead of the internal logging facility. */ void gcry_set_log_handler (gcry_handler_log_t f, void *opaque); /* Reserved for future use. */ void gcry_set_gettext_handler (const char *(*f)(const char*)); /* Libgcrypt uses its own memory allocation. It is important to use gcry_free () to release memory allocated by libgcrypt. */ void *gcry_malloc (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_calloc (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_malloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_calloc_secure (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_realloc (void *a, size_t n); char *gcry_strdup (const char *string) _GCRY_GCC_ATTR_MALLOC; void *gcry_xmalloc (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_xcalloc (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_xmalloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_xcalloc_secure (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_xrealloc (void *a, size_t n); char *gcry_xstrdup (const char * a) _GCRY_GCC_ATTR_MALLOC; void gcry_free (void *a); /* Return true if A is allocated in "secure" memory. */ int gcry_is_secure (const void *a) _GCRY_GCC_ATTR_PURE; /* Include support for Libgcrypt modules. */ #include #if 0 /* keep Emacsens' auto-indent happy */ { #endif #ifdef __cplusplus } #endif #endif /* _GCRYPT_H */ earch. kR 2DCtyBtyB6 2./usr/local/include/gcrypt-module.hab/* gcrypt-module.h - GNU cryptographic library interface * Copyright (C) 2003 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * * Libgcrypt is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * Libgcrypt is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ /* This file contains the necessary declarations/definitions for working with Libgcrypt modules. */ #ifndef _GCRYPT_MODULE_H #define _GCRYPT_MODULE_H #ifdef __cplusplus extern "C" { #if 0 /* keep Emacsens's auto-indent happy */ } #endif #endif /* This type represents a `module'. */ typedef struct gcry_module *gcry_module_t; /* Check that the library fulfills the version requirement. */ /* Type for the cipher_setkey function. */ typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c, const unsigned char *key, unsigned keylen); /* Type for the cipher_encrypt function. */ typedef void (*gcry_cipher_encrypt_t) (void *c, unsigned char *outbuf, const unsigned char *inbuf); /* Type for the cipher_decrypt function. */ typedef void (*gcry_cipher_decrypt_t) (void *c, unsigned char *outbuf, const unsigned char *inbuf); /* Type for the cipher_stencrypt function. */ typedef void (*gcry_cipher_stencrypt_t) (void *c, unsigned char *outbuf, const unsigned char *inbuf, unsigned int n); /* Type for the cipher_stdecrypt function. */ typedef void (*gcry_cipher_stdecrypt_t) (void *c, unsigned char *outbuf, const unsigned char *inbuf, unsigned int n); typedef struct gcry_cipher_oid_spec { const char *oid; int mode; } gcry_cipher_oid_spec_t; /* Module specification structure for ciphers. */ typedef struct gcry_cipher_spec { const char *name; const char **aliases; gcry_cipher_oid_spec_t *oids; size_t blocksize; size_t keylen; size_t contextsize; gcry_cipher_setkey_t setkey; gcry_cipher_encrypt_t encrypt; gcry_cipher_decrypt_t decrypt; gcry_cipher_stencrypt_t stencrypt; gcry_cipher_stdecrypt_t stdecrypt; } gcry_cipher_spec_t; /* Register a new cipher module whose specification can be found in CIPHER. On success, a new algorithm ID is stored in ALGORITHM_ID and a pointer representhing this module is stored in MODULE. */ gcry_error_t gcry_cipher_register (gcry_cipher_spec_t *cipher, unsigned int *algorithm_id, gcry_module_t *module); /* Unregister the cipher identified by MODULE, which must have been registered with gcry_cipher_register. */ void gcry_cipher_unregister (gcry_module_t module); /* ********************** */ /* Type for the pk_generate function. */ typedef gcry_err_code_t (*gcry_pk_generate_t) (int algo, unsigned int nbits, unsigned long use_e, gcry_mpi_t *skey, gcry_mpi_t **retfactors); /* Type for the pk_check_secret_key function. */ typedef gcry_err_code_t (*gcry_pk_check_secret_key_t) (int algo, gcry_mpi_t *skey); /* Type for the pk_encrypt function. */ typedef gcry_err_code_t (*gcry_pk_encrypt_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *pkey, int flags); /* Type for the pk_decrypt function. */ typedef gcry_err_code_t (*gcry_pk_decrypt_t) (int algo, gcry_mpi_t *result, gcry_mpi_t *data, gcry_mpi_t *skey, int flags); /* Type for the pk_sign function. */ typedef gcry_err_code_t (*gcry_pk_sign_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey); /* Type for the pk_verify function. */ typedef gcry_err_code_t (*gcry_pk_verify_t) (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey, int (*cmp) (void *, gcry_mpi_t), void *opaquev); /* Type for the pk_get_nbits function. */ typedef unsigned (*gcry_pk_get_nbits_t) (int algo, gcry_mpi_t *pkey); /* Module specification structure for message digests. */ typedef struct gcry_pk_spec { const char *name; char **aliases; const char *elements_pkey; const char *elements_skey; const char *elements_enc; const char *elements_sig; const char *elements_grip; int use; gcry_pk_generate_t generate; gcry_pk_check_secret_key_t check_secret_key; gcry_pk_encrypt_t encrypt; gcry_pk_decrypt_t decrypt; gcry_pk_sign_t sign; gcry_pk_verify_t verify; gcry_pk_get_nbits_t get_nbits; } gcry_pk_spec_t; /* Register a new pubkey module whose specification can be found in PUBKEY. On success, a new algorithm ID is stored in ALGORITHM_ID and a pointer representhing this module is stored in MODULE. */ gcry_error_t gcry_pk_register (gcry_pk_spec_t *pubkey, unsigned int *algorithm_id, gcry_module_t *module); /* Unregister the pubkey identified by ID, which must have been registered with gcry_pk_register. */ void gcry_pk_unregister (gcry_module_t module); /* ********************** */ /* Type for the md_init function. */ typedef void (*gcry_md_init_t) (void *c); /* Type for the md_write function. */ typedef void (*gcry_md_write_t) (void *c, unsigned char *buf, size_t nbytes); /* Type for the md_final function. */ typedef void (*gcry_md_final_t) (void *c); /* Type for the md_read function. */ typedef unsigned char *(*gcry_md_read_t) (void *c); typedef struct gcry_md_oid_spec { const char *oidstring; } gcry_md_oid_spec_t; /* Module specification structure for message digests. */ typedef struct gcry_md_spec { const char *name; unsigned char *asnoid; int asnlen; gcry_md_oid_spec_t *oids; int mdlen; gcry_md_init_t init; gcry_md_write_t write; gcry_md_final_t final; gcry_md_read_t read; size_t contextsize; /* allocate this amount of context */ } gcry_md_spec_t; /* Register a new digest module whose specification can be found in DIGEST. On success, a new algorithm ID is stored in ALGORITHM_ID and a pointer representhing this module is stored in MODULE. */ gcry_error_t gcry_md_register (gcry_md_spec_t *digest, unsigned int *algorithm_id, gcry_module_t *module); /* Unregister the digest identified by ID, which must have been registered with gcry_digest_register. */ void gcry_md_unregister (gcry_module_t module); #if 0 /* keep Emacsens's auto-indent happy */ { #endif #ifdef __cplusplus } #endif #endif gcry_e k`D1NDCtyBtyB6N./usr/local/share/aclocal/libgcrypt.m4bdnl Autoconf macros for libgcrypt dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. dnl dnl This file is free software; as a special exception the author gives dnl unlimited permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl dnl This file is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed dnl with the API version to also check the API compatibility. Example: dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using dnl this features allows to prevent build against newer versions of libgcrypt dnl with a changed API. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_ARG_WITH(libgcrypt-prefix, AC_HELP_STRING([--with-libgcrypt-prefix=PFX], [prefix where LIBGCRYPT is installed (optional)]), libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") if test x$libgcrypt_config_prefix != x ; then if test x${LIBGCRYPT_CONFIG+set} != xset ; then LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config fi fi AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_libgcrypt_api=0 min_libgcrypt_version="$tmp" fi AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version) ok=no if test "$LIBGCRYPT_CONFIG" != "no" ; then req_major=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` micro=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -gt "$req_minor"; then ok=yes else if test "$minor" -eq "$req_minor"; then if test "$micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi if test $ok = yes; then # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then AC_MSG_RESULT(okay) else ok=no AC_MSG_RESULT([does not match (want=$req_libgcrypt_api got=$tmp)]) fi fi fi fi if test $ok = yes; then LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) else LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(LIBGCRYPT_CFLAGS) AC_SUBST(LIBGCRYPT_LIBS) ]) wa k4XbDCuyBuyB6_b./usr/local/info/dirocabThis is the file .../info/dir, which contains the topmost node of the Info hierarchy, called (dir)Top. The first time you invoke Info you start off looking at this node.  File: dir, Node: Top This is the top of the INFO tree This (the Directory node) gives a menu of major topics. Typing "q" exits, "?" lists all Info commands, "d" returns here, "h" gives a primer for first-timers, "mEmacs" visits the Emacs manual, etc. In Emacs, you can click mouse button 2 on a menu item or cross reference to select it. * Menu: GNU Libraries * libgcrypt: (gcrypt) Cryptographic function library. , ACTI kjX.DCuyBuyB6_../usr/local/info/gcrypt.infogcrbThis is gcrypt.info, produced by makeinfo version 4.7 from gcrypt.texi. This manual is for Libgcrypt (version 1.2.1, 4 January 2005), which is GNU's library of cryptographic building blocks. Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The text of the license can be found in the section entitled "Copying". INFO-DIR-SECTION GNU Libraries START-INFO-DIR-ENTRY * libgcrypt: (gcrypt) Cryptographic function library. END-INFO-DIR-ENTRY  File: gcrypt.info, Node: Top, Next: Introduction, Up: (dir) The Libgcrypt Library ********************* This manual is for Libgcrypt (version 1.2.1, 4 January 2005), which is GNU's library of cryptographic building blocks. Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The text of the license can be found in the section entitled "Copying". * Menu: * Introduction:: What is Libgcrypt. * Preparation:: What you should do before using the library. * Generalities:: General library functions and data types. * Handler Functions:: Working with handler functions. * Symmetric cryptography:: How to use symmetric cryptography. * Hashing:: How to use hashing. * Public Key cryptography (I):: How to use public key cryptography. * Public Key cryptography (II):: How to use public key cryptography, alternatively. * Random Numbers:: How to work with random numbers. * S-expressions:: How to manage S-expressions. * MPI library:: How to work with multi-precision-integers. * Utilities:: Utility functions. Appendices * Library Copying:: The GNU Lesser General Public License says how you can copy and share `Libgcrypt'. * Copying:: The GNU General Public License says how you can copy and share some parts of `Libgcrypt'. Indices * Concept Index:: Index of concepts and programs. * Function and Data Index:: Index of functions, variables and data types. --- The Detailed Node Listing --- Introduction * Getting Started:: How to use this manual. * Features:: A glance at Libgcrypt's features. * Overview:: Overview about the library. Preparation * Header:: What header file you need to include. * Building sources:: How to build sources using the library. * Building sources using Automake:: How to build sources with the help of Automake. * Initializing the library:: How to initialize the library. * Multi Threading:: How Libgcrypt can be used in a MT environment. Generalities * Controlling the library:: Controlling Libgcrypt's behavior. * Modules:: Description of extension modules. * Error Handling:: Error codes and such. Handler Functions * Progress handler:: Using a progress handler function. * Allocation handler:: Using special memory allocation functions. * Error handler:: Using error handler functions. * Logging handler:: Using a special logging function. Symmetric cryptography * Available ciphers:: List of ciphers supported by the library. * Cipher modules:: How to work with cipher modules. * Available cipher modes:: List of cipher modes supported by the library. * Working with cipher handles:: How to perform operations related to cipher handles. * General cipher functions:: General cipher functions independent of cipher handles. Hashing * Available hash algorithms:: List of hash algorithms supported by the library. * Hash algorithm modules:: How to work with hash algorithm modules. * Working with hash algorithms:: List of functions related to hashing. Public Key cryptography (I) * Used S-expressions:: Introduction into the used S-expression. * Available algorithms:: Algorithms supported by the library. * Public key modules:: How to work with public key modules. * Cryptographic Functions:: Functions for performing the cryptographic actions. * General public-key related Functions:: General functions, not implementing any cryptography. Public Key cryptography (II) * Available asymmetric algorithms:: List of algorithms supported by the library. * Working with sets of data:: How to work with sets of data. * Working with handles:: How to use handles. * Working with keys:: How to work with keys. * Using cryptographic functions:: How to perform cryptographic operations. * Handle-independent functions:: General functions independent of handles. Random Numbers * Quality of random numbers:: Libgcrypt uses different quality levels. * Retrieving random numbers:: How to retrieve random numbers. S-expressions * Data types for S-expressions:: Data types related with S-expressions. * Working with S-expressions:: How to work with S-expressions. MPI library * Data types:: MPI related data types. * Basic functions:: First steps with MPI numbers. * MPI formats:: External representation of MPIs. * Calculations:: Performing MPI calculations. * Comparisons:: How to compare MPI values. * Bit manipulations:: How to access single bits of MPI values. * Miscellaneous:: Miscellaneous MPI functions. Utilities * Memory allocation:: Functions related with memory allocation.  File: gcrypt.info, Node: Introduction, Next: Preparation, Prev: Top, Up: Top 1 Introduction ************** `Libgcrypt' is a library providing cryptographic building blocks. * Menu: * Getting Started:: How to use this manual. * Features:: A glance at Libgcrypt's features. * Overview:: Overview about the library.  File: gcrypt.info, Node: Getting Started, Next: Features, Up: Introduction 1.1 Getting Started =================== This manual documents the `Libgcrypt' library application programming interface (API). All functions and data types provided by the library are explained. The reader is assumed to possess basic knowledge about applied cryptography. This manual can be used in several ways. If read from the beginning to the end, it gives a good introduction into the library and how it can be used in an application. Forward references are included where necessary. Later on, the manual can be used as a reference manual to get just the information needed about any particular interface of the library. Experienced programmers might want to start looking at the examples at the end of the manual, and then only read up those parts of the interface which are unclear.  File: gcrypt.info, Node: Features, Next: Overview, Prev: Getting Started, Up: Introduction 1.2 Features ============ `Libgcrypt' might have a couple of advantages over other libraries doing a similar job. It's Free Software Anybody can use, modify, and redistribute it under the terms of the GNU Lesser General Public License (*note Library Copying::). Note, that some parts (which are not needed on a GNU or GNU/Linux system) are subject to the terms of the GNU General Public License (*note Copying::); please see the README file of the distribution for of list of these parts. It encapsulates the low level cryptography `Libgcrypt' provides a high level interface to cryptographic building blocks using an extendable and flexible API.  File: gcrypt.info, Node: Overview, Prev: Features, Up: Introduction 1.3 Overview ============ The `Libgcrypt' library is fully thread-safe, where it makes sense to be thread-safe. An exception for thread-safety are some cryptographic functions that modify a certain context stored in handles. If the user really intents to use such functions from different threads on the same handle, he has to take care of the serialization of such functions himself. If not described otherwise, every function is thread-safe. Libgcrypt depends on the library `libgpg-error', which contains common error handling related code for GnuPG components.  File: gcrypt.info, Node: Preparation, Next: Generalities, Prev: Introduction, Up: Top 2 Preparation ************* To use `Libgcrypt', you have to perform some changes to your sources and the build system. The necessary changes are small and explained in the following sections. At the end of this chapter, it is described how the library is initialized, and how the requirements of the library are verified. * Menu: * Header:: What header file you need to include. * Building sources:: How to build sources using the library. * Building sources using Automake:: How to build sources with the help of Automake. * Initializing the library:: How to initialize the library. * Multi Threading:: How Libgcrypt can be used in a MT environment.  File: gcrypt.info, Node: Header, Next: Building sources, Up: Preparation 2.1 Header ========== All interfaces (data types and functions) of the library are defined in the header file `gcrypt.h'. You must include this in all source files using the library, either directly or through some other header file, like this: #include The name space of `Libgcrypt' is `gcry_*' for function and type names and `GCRY*' for other symbols. In addition the same name prefixes with one prepended underscore are reserved for internal use and should never be used by an application. Furthermore `libgpg-error' defines functions prefixed with `gpg_' and preprocessor symbols prefixed with `GPG_'. Note that Libgcrypt uses libgpg-error, which uses `gpg_err_*' as name space for function and type names and `GPG_ERR_*' for other symbols, including all the error codes.  File: gcrypt.info, Node: Building sources, Next: Building sources using Automake, Prev: Header, Up: Preparation 2.2 Building sources ==================== If you want to compile a source file including the `gcrypt.h' header file, you must make sure that the compiler can find it in the directory hierarchy. This is accomplished by adding the path to the directory in which the header file is located to the compilers include file search path (via the `-I' option). However, the path to the include file is determined at the time the source is configured. To solve this problem, `Libgcrypt' ships with a small helper program `libgcrypt-config' that knows the path to the include file and other configuration options. The options that need to be added to the compiler invocation at compile time are output by the `--cflags' option to `libgcrypt-config'. The following example shows how it can be used at the command line: gcc -c foo.c `libgcrypt-config --cflags` Adding the output of `libgcrypt-config --cflags' to the compilers command line will ensure that the compiler can find the `Libgcrypt' header file. A similar problem occurs when linking the program with the library. Again, the compiler has to find the library files. For this to work, the path to the library files has to be added to the library search path (via the `-L' option). For this, the option `--libs' to `libgcrypt-config' can be used. For convenience, this option also outputs all other options that are required to link the program with the `Libgcrypt' libraries (in particular, the `-lgcrypt' option). The example shows how to link `foo.o' with the `Libgcrypt' library to a program `foo'. gcc -o foo foo.o `libgcrypt-config --libs` Of course you can also combine both examples to a single command by specifying both options to `libgcrypt-config': gcc -o foo foo.c `libgcrypt-config --cflags --libs`  File: gcrypt.info, Node: Building sources using Automake, Next: Initializing the library, Prev: Building sources, Up: Preparation 2.3 Building sources using Automake =================================== It is much easier if you use GNU Automake instead of writing your own Makefiles. If you do that you do not have to worry about finding and invoking the `libgcrypt-config' script at all. Libgcrypt provides an extension to Automake that does all the work for you. -- Macro: AM_PATH_LIBGCRYPT ([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) Check whether Libgcrypt (at least version MINIMUM-VERSION, if given) exists on the host system. If it is found, execute ACTION-IF-FOUND, otherwise do ACTION-IF-NOT-FOUND, if given. Additionally, the function defines `LIBGCRYPT_CFLAGS' to the flags needed for compilation of the program to find the `gcrypt.h' header file, and `LIBGCRYPT_LIBS' to the linker flags needed to link the program to the Libgcrypt library. You can use the defined Autoconf variables like this in your `Makefile.am': AM_CPPFLAGS = $(LIBGCRYPT_CFLAGS) LDADD = $(LIBGCRYPT_LIBS)  File: gcrypt.info, Node: Initializing the library, Next: Multi Threading, Prev: Building sources using Automake, Up: Preparation 2.4 Initializing the library ============================ It is often desirable to check that the version of `Libgcrypt' used is indeed one which fits all requirements. Even with binary compatibility new features may have been introduced but due to problem with the dynamic linker an old version is actually used. So you may want to check that the version is okay right after program startup. -- Function: const char *gcry_check_version (const char *REQ_VERSION) The function `gcry_check_version' has three purposes. It can be used to retrieve the version number of the library. In addition it can verify that the version number is higher than a certain required version number. In either case, the function initializes some sub-systems, and for this reason alone it must be invoked early in your program, before you make use of the other functions of Libgcrypt.  File: gcrypt.info, Node: Multi Threading, Prev: Initializing the library, Up: Preparation 2.5 Multi Threading =================== As mentioned earlier, the `Libgcrypt' library is thread-safe if you adhere to the following requirements: * If your application is multi-threaded, you must set the thread support callbacks with the `GCRYCTL_SET_THREAD_CBS' command *before* any other function in the library. This is easy enough if you are indeed writing an application using Libgcrypt. It is rather problematic if you are writing a library instead. Here are some tips what to do if you are writing a library: If your library requires a certain thread package, just initialize Libgcrypt to use this thread package. If your library supports multiple thread packages, but needs to be configured, you will have to implement a way to determine which thread package the application wants to use with your library anyway. Then configure Libgcrypt to use this thread package. If your library is fully reentrant without any special support by a thread package, then you are lucky indeed. Unfortunately, this does not relieve you from doing either of the two above, or use a third option. The third option is to let the application initialize Libgcrypt for you. Then you are not using Libgcrypt transparently, though. As if this was not difficult enough, a conflict may arise if two libraries try to initialize Libgcrypt independently of each others, and both such libraries are then linked into the same application. To make it a bit simpler for you, this will probably work, but only if both libraries have the same requirement for the thread package. This is currently only supported for the non-threaded case, GNU Pth and pthread. Support for more thread packages is easy to add, so contact us if you require it. * The function `gcry_check_version' must be called before any other function in the library, except the `GCRYCTL_SET_THREAD_CBS' command (called via the `gcry_control' function), because it initializes the thread support subsystem in Libgcrypt. To achieve this in multi-threaded programs, you must synchronize the memory with respect to other threads that also want to use Libgcrypt. For this, it is sufficient to call `gcry_check_version' before creating the other threads using Libgcrypt(1). * As with the function `gpg_strerror', `gcry_strerror' is not thread safe. You have to use `gpg_strerror_r' instead. Libgcrypt contains convenient macros, which define the necessary thread callbacks for PThread and for GNU Pth: `GCRY_THREAD_OPTION_PTH_IMPL' This macro defines the following (static) symbols: gcry_pth_init, gcry_pth_mutex_init, gcry_pth_mutex_destroy, gcry_pth_mutex_lock, gcry_pth_mutex_unlock, gcry_pth_read, gcry_pth_write, gcry_pth_select, gcry_pth_waitpid, gcry_pth_accept, gcry_pth_connect, gcry_threads_pth. After including this macro, gcry_control() shall be used with a command of GCRYCTL_SET_THREAD_CBS in order to register the thread callback structure named "gcry_threads_pth". `GCRY_THREAD_OPTION_PTHREAD_IMPL' This macro defines the following (static) symbols: gcry_pthread_mutex_init, gcry_pthread_mutex_destroy, gcry_mutex_lock, gcry_mutex_unlock, gcry_threads_pthread. After including this macro, gcry_control() shall be used with a command of GCRYCTL_SET_THREAD_CBS in order to register the thread callback structure named "gcry_threads_pthread". Note that these macros need to be terminated with a semicolon. Keep in mind that these are convenient macros for C programmers; C++ programmers might have to wrap these macros in an "extern C" body. ---------- Footnotes ---------- (1) At least this is true for POSIX threads, as `pthread_create' is a function that synchronizes memory with respects to other threads. There are many functions which have this property, a complete list can be found in POSIX, IEEE Std 1003.1-2003, Base Definitions, Issue 6, in the definition of the term "Memory Synchronization". For other thread packages, more relaxed or more strict rules may apply.  File: gcrypt.info, Node: Generalities, Next: Handler Functions, Prev: Preparation, Up: Top 3 Generalities ************** * Menu: * Controlling the library:: Controlling Libgcrypt's behavior. * Modules:: Description of extension modules. * Error Handling:: Error codes and such.  File: gcrypt.info, Node: Controlling the library, Next: Modules, Up: Generalities 3.1 Controlling the library =========================== -- Function: gcry_error_t gcry_control (enum gcry_ctl_cmds CMD, ...) This function can be used to influence the general behavior of Libgcrypt in several ways. Depending on CMD, more arguments can or have to be provided.  File: gcrypt.info, Node: Modules, Next: Error Handling, Prev: Controlling the library, Up: Generalities 3.2 Modules =========== Libgcrypt supports the use of `extension modules', which implement algorithms in addition to those already built into the library directly. -- Data type: gcry_module_t This data type represents a `module'. Functions registering modules provided by the user take a `module specification structure' as input and return a value of `gcry_module_t' and an ID that is unique in the modules' category. This ID can be used to reference the newly registered module. After registering a module successfully, the new functionality should be able to be used through the normal functions provided by Libgcrypt until it is unregistered again.  File: gcrypt.info, Node: Error Handling, Prev: Modules, Up: Generalities 3.3 Error Handling ================== Many functions in Libgcrypt can return an error if they fail. For this reason, the application should always catch the error condition and take appropriate measures, for example by releasing the resources and passing the error up to the caller, or by displaying a descriptive message to the user and cancelling the operation. Some error values do not indicate a system error or an error in the operation, but the result of an operation that failed properly. For example, if you try to decrypt a tempered message, the decryption will fail. Another error value actually means that the end of a data buffer or list has been reached. The following descriptions explain for many error codes what they mean usually. Some error values have specific meanings if returned by a certain functions. Such cases are described in the documentation of those functions. Libgcrypt uses the `libgpg-error' library. This allows to share the error codes with other components of the GnuPG system, and thus pass error values transparently from the crypto engine, or some helper application of the crypto engine, to the user. This way no information is lost. As a consequence, Libgcrypt does not use its own identifiers for error codes, but uses those provided by `libgpg-error'. They usually start with `GPG_ERR_'. However, Libgcrypt does provide aliases for the functions defined in libgpg-error, which might be preferred for name space consistency. Most functions in Libgcrypt return an error code in the case of failure. For this reason, the application should always catch the error condition and take appropriate measures, for example by releasing the resources and passing the error up to the caller, or by displaying a descriptive message to the user and canceling the operation. Some error values do not indicate a system error or an error in the operation, but the result of an operation that failed properly. GnuPG components, including Libgcrypt, use an extra library named libgpg-error to provide a common error handling scheme. For more information on libgpg-error, see the according manual. * Menu: * Error Values:: The error value and what it means. * Error Sources:: A list of important error sources. * Error Codes:: A list of important error codes. * Error Strings:: How to get a descriptive string from a value.  File: gcrypt.info, Node: Error Values, Next: Error Sources, Up: Error Handling 3.3.1 Error Values ------------------ -- Data type: gcry_err_code_t The `gcry_err_code_t' type is an alias for the `libgpg-error' type `gpg_err_code_t'. The error code indicates the type of an error, or the reason why an operation failed. A list of important error codes can be found in the next section. -- Data type: gcry_err_source_t The `gcry_err_source_t' type is an alias for the `libgpg-error' type `gpg_err_source_t'. The error source has not a precisely defined meaning. Sometimes it is the place where the error happened, sometimes it is the place where an error was encoded into an error value. Usually the error source will give an indication to where to look for the problem. This is not always true, but it is attempted to achieve this goal. A list of important error sources can be found in the next section. -- Data type: gcry_error_t The `gcry_error_t' type is an alias for the `libgpg-error' type `gpg_error_t'. An error value like this has always two components, an error code and an error source. Both together form the error value. Thus, the error value can not be directly compared against an error code, but the accessor functions described below must be used. However, it is guaranteed that only 0 is used to indicate success (`GPG_ERR_NO_ERROR'), and that in this case all other parts of the error value are set to 0, too. Note that in Libgcrypt, the error source is used purely for diagnostic purposes. Only the error code should be checked to test for a certain outcome of a function. The manual only documents the error code part of an error value. The error source is left unspecified and might be anything. -- Function: gcry_err_code_t gcry_err_code (gcry_error_t ERR) The static inline function `gcry_err_code' returns the `gcry_err_code_t' component of the error value ERR. This function must be used to extract the error code from an error value in order to compare it with the `GPG_ERR_*' error code macros. -- Function: gcry_err_source_t gcry_err_source (gcry_error_t ERR) The static inline function `gcry_err_source' returns the `gcry_err_source_t' component of the error value ERR. This function must be used to extract the error source from an error value in order to compare it with the `GPG_ERR_SOURCE_*' error source macros. -- Function: gcry_error_t gcry_err_make (gcry_err_source_t SOURCE, gcry_err_code_t CODE) The static inline function `gcry_err_make' returns the error value consisting of the error source SOURCE and the error code CODE. This function can be used in callback functions to construct an error value to return it to the library. -- Function: gcry_error_t gcry_error (gcry_err_code_t CODE) The static inline function `gcry_error' returns the error value consisting of the default error source and the error code CODE. For GCRY applications, the default error source is `GPG_ERR_SOURCE_USER_1'. You can define `GCRY_ERR_SOURCE_DEFAULT' before including `gcrypt.h' to change this default. This function can be used in callback functions to construct an error value to return it to the library. The `libgpg-error' library provides error codes for all system error numbers it knows about. If ERR is an unknown error number, the error code `GPG_ERR_UNKNOWN_ERRNO' is used. The following functions can be used to construct error values from system errno numbers. -- Function: gcry_error_t gcry_err_make_from_errno (gcry_err_source_t SOURCE, int ERR) The function `gcry_err_make_from_errno' is like `gcry_err_make', but it takes a system error like `errno' instead of a `gcry_err_code_t' error code. -- Function: gcry_error_t gcry_error_from_errno (int ERR) The function `gcry_error_from_errno' is like `gcry_error', but it takes a system error like `errno' instead of a `gcry_err_code_t' error code. Sometimes you might want to map system error numbers to error codes directly, or map an error code representing a system error back to the system error number. The following functions can be used to do that. -- Function: gcry_err_code_t gcry_err_code_from_errno (int ERR) The function `gcry_err_code_from_errno' returns the error code for the system error ERR. If ERR is not a known system error, the function returns `GPG_ERR_UNKNOWN_ERRNO'. -- Function: int gcry_err_code_to_errno (gcry_err_code_t ERR) The function `gcry_err_code_to_errno' returns the system error for the error code ERR. If ERR is not an error code representing a system error, or if this system error is not defined on this system, the function returns `0'.  File: gcrypt.info, Node: Error Sources, Next: Error Codes, Prev: Error Values, Up: Error Handling 3.3.2 Error Sources ------------------- The library `libgpg-error' defines an error source for every component of the GnuPG system. The error source part of an error value is not well defined. As such it is mainly useful to improve the diagnostic error message for the user. If the error code part of an error value is `0', the whole error value will be `0'. In this case the error source part is of course `GPG_ERR_SOURCE_UNKNOWN'. The list of error sources that might occur in applications using Libgctypt is: `GPG_ERR_SOURCE_UNKNOWN' The error source is not known. The value of this error source is `0'. `GPG_ERR_SOURCE_GPGME' The error source is GPGME itself. `GPG_ERR_SOURCE_GPG' The error source is GnuPG, which is the crypto engine used for the OpenPGP protocol. `GPG_ERR_SOURCE_GPGSM' The error source is GPGSM, which is the crypto engine used for the OpenPGP protocol. `GPG_ERR_SOURCE_GCRYPT' The error source is `libgcrypt', which is used by crypto engines to perform cryptographic operations. `GPG_ERR_SOURCE_GPGAGENT' The error source is `gpg-agent', which is used by crypto engines to perform operations with the secret key. `GPG_ERR_SOURCE_PINENTRY' The error source is `pinentry', which is used by `gpg-agent' to query the passphrase to unlock a secret key. `GPG_ERR_SOURCE_SCD' The error source is the SmartCard Daemon, which is used by `gpg-agent' to delegate operations with the secret key to a SmartCard. `GPG_ERR_SOURCE_KEYBOX' The error source is `libkbx', a library used by the crypto engines to manage local keyrings. `GPG_ERR_SOURCE_USER_1' `GPG_ERR_SOURCE_USER_2' `GPG_ERR_SOURCE_USER_3' `GPG_ERR_SOURCE_USER_4' These error sources are not used by any GnuPG component and can be used by other software. For example, applications using Libgcrypt can use them to mark error values coming from callback handlers. Thus `GPG_ERR_SOURCE_USER_1' is the default for errors created with `gcry_error' and `gcry_error_from_errno', unless you define `GCRY_ERR_SOURCE_DEFAULT' before including `gcrypt.h'.  File: gcrypt.info, Node: Error Codes, Next: Error Strings, Prev: Error Sources, Up: Error Handling 3.3.3 Error Codes ----------------- The library `libgpg-error' defines many error values. The following list includes the most important error codes. `GPG_ERR_EOF' This value indicates the end of a list, buffer or file. `GPG_ERR_NO_ERROR' This value indicates success. The value of this error code is `0'. Also, it is guaranteed that an error value made from the error code `0' will be `0' itself (as a whole). This means that the error source information is lost for this error code, however, as this error code indicates that no error occured, this is generally not a problem. `GPG_ERR_GENERAL' This value means that something went wrong, but either there is not enough information about the problem to return a more useful error value, or there is no separate error value for this type of problem. `GPG_ERR_ENOMEM' This value means that an out-of-memory condition occurred. `GPG_ERR_E...' System errors are mapped to GPG_ERR_EFOO where FOO is the symbol for the system error. `GPG_ERR_INV_VALUE' This value means that some user provided data was out of range. `GPG_ERR_UNUSABLE_PUBKEY' This value means that some recipients for a message were invalid. `GPG_ERR_UNUSABLE_SECKEY' This value means that some signers were invalid. `GPG_ERR_NO_DATA' This value means that data was expected where no data was found. `GPG_ERR_CONFLICT' This value means that a conflict of some sort occurred. `GPG_ERR_NOT_IMPLEMENTED' This value indicates that the specific function (or operation) is not implemented. This error should never happen. It can only occur if you use certain values or configuration options which do not work, but for which we think that they should work at some later time. `GPG_ERR_DECRYPT_FAILED' This value indicates that a decryption operation was unsuccessful. `GPG_ERR_WRONG_KEY_USAGE' This value indicates that a key is not used appropriately. `GPG_ERR_NO_SECKEY' This value indicates that no secret key for the user ID is available. `GPG_ERR_UNSUPPORTED_ALGORITHM' This value means a verification failed because the cryptographic algorithm is not supported by the crypto backend. `GPG_ERR_BAD_SIGNATURE' This value means a verification failed because the signature is bad. `GPG_ERR_NO_PUBKEY' This value means a verification failed because the public key is not available. `GPG_ERR_USER_1' `GPG_ERR_USER_2' `...' `GPG_ERR_USER_16' These error codes are not used by any GnuPG component and can be freely used by other software. Applications using Libgcrypt might use them to mark specific errors returned by callback handlers if no suitable error codes (including the system errors) for these errors exist already.  File: gcrypt.info, Node: Error Strings, Prev: Error Codes, Up: Error Handling 3.3.4 Error Strings ------------------- -- Function: const char * gcry_strerror (gcry_error_t ERR) The function `gcry_strerror' returns a pointer to a statically allocated string containing a description of the error code contained in the error value ERR. This string can be used to output a diagnostic message to the user. -- Function: const char * gcry_strsource (gcry_error_t ERR) The function `gcry_strerror' returns a pointer to a statically allocated string containing a description of the error source contained in the error value ERR. This string can be used to output a diagnostic message to the user. The following example illustrates the use of the functions described above: { gcry_cipher_hd_t handle; gcry_error_t err = 0; err = gcry_cipher_open (&handle, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_CBC, 0); if (err) { fprintf (stderr, "Failure: %s/%s\n", gcry_strsource (err), gcry_strerror (err)); } }  File: gcrypt.info, Node: Handler Functions, Next: Symmetric cryptography, Prev: Generalities, Up: Top 4 Handler Functions ******************* Libgcrypt makes it possible to install so called `handler functions', which get called by Libgcrypt in case of certain events. * Menu: * Progress handler:: Using a progress handler function. * Allocation handler:: Using special memory allocation functions. * Error handler:: Using error handler functions. * Logging handler:: Using a special logging function.  File: gcrypt.info, Node: Progress handler, Next: Allocation handler, Up: Handler Functions 4.1 Progress handler ==================== It is often useful to retrieve some feedback while long running operations are performed. -- Data type: gcry_handler_progress_t Progress handler functions have to be of the type `gcry_handler_progress_t', which is defined as: `void (*gcry_handler_progress_t) (void *, const char *, int, int, int)' The following function may be used to register a handler function for this purpose. -- Function: void gcry_set_progress_handler (gcry_handler_progress_t CB, void *CB_DATA) This function installs CB as the `Progress handler' function. CB must be defined as follows: void my_progress_handler (void *CB_DATA, const char *WHAT, int PRINTCHAR, int CURRENT, int TOTAL) { /* Do something. */ } A description of the arguments of the progress handler function follows. CB_DATA The argument provided in the call to `gcry_set_progress_handler'. WHAT A string identifying the type of the progress output. The following values for WHAT are defined: `need_entropy' Not enough entropy is available. TOTAL holds the number of required bytes. `primegen' Values for PRINTCHAR: `\n' Prime generated. `!' Need to refresh the pool of prime numbers. `<, >' Number of bits adjusted. `^' Searching for a generator. `.' Fermat test on 10 candidates failed. `:' Restart with a new random value. `+' Rabin Miller test passed.  File: gcrypt.info, Node: Allocation handler, Next: Error handler, Prev: Progress handler, Up: Handler Functions 4.2 Allocation handler ====================== It is possible to make Libgcrypt use special memory allocation functions instead of the built-in ones. Memory allocation functions are of the following types: -- Data type: gcry_handler_alloc_t This type is defined as: `void *(*gcry_handler_alloc_t) (size_t n)'. -- Data type: gcry_handler_secure_check_t This type is defined as: `int *(*gcry_handler_secure_check_t) (const void *)'. -- Data type: gcry_handler_realloc_t This type is defined as: `void *(*gcry_handler_realloc_t) (void *p, size_t n)'. -- Data type: gcry_handler_free_t This type is defined as: `void *(*gcry_handler_free_t) (void *)'. Special memory allocation functions can be installed with the following function: -- Function: void gcry_set_allocation_handler (gcry_handler_alloc_t FUNC_ALLOC, gcry_handler_alloc_t FUNC_ALLOC_SECURE, gcry_handler_secure_check_t FUNC_SECURE_CHECK, gcry_handler_realloc_t FUNC_REALLOC, gcry_handler_free_t FUNC_FREE) Install the provided functions and use them instead of the built-in functions for doing memory allocation.  File: gcrypt.info, Node: Error handler, Next: Logging handler, Prev: Allocation handler, Up: Handler Functions 4.3 Error handler ================= The following functions may be used to register handler functions that are called by Libgcrypt in case certain error conditions occur. -- Data type: gcry_handler_no_mem_t This type is defined as: `void (*gcry_handler_no_mem_t) (void *, size_t, unsigned int)' -- Function: void gcry_set_outofcore_handler (gcry_handler_no_mem_t FUNC_NO_MEM, void *CB_DATA) This function registers FUNC_NO_MEM as `out-of-core handler', which means that it will be called in the case of not having enough memory available. -- Data type: gcry_handler_error_t This type is defined as: `void (*gcry_handler_error_t) (void *, int, const char *)' -- Function: void gcry_set_fatalerror_handler (gcry_handler_error_t FUNC_ERROR, void *CB_DATA) This function registers FUNC_ERROR as `error handler', which means that it will be called in error conditions.  File: gcrypt.info, Node: Logging handler, Prev: Error handler, Up: Handler Functions 4.4 Logging handler =================== -- Data type: gcry_handler_log_t This type is defined as: `void (*gcry_handler_log_t) (void *, int, const char *, va_list)' -- Function: void gcry_set_log_handler (gcry_handler_log_t FUNC_LOG, void *CB_DATA) This function registers FUNC_LOG as `logging handler', which means that it will be called in case Libgcrypt wants to log a message.  File: gcrypt.info, Node: Symmetric cryptography, Next: Hashing, Prev: Handler Functions, Up: Top 5 Symmetric cryptography ************************ The cipher functions are used for symmetrical cryptography, i.e. cryptography using a shared key. The programming model follows an open/process/close paradigm and is in that similar to other building blocks provided by Libgcrypt. * Menu: * Available ciphers:: List of ciphers supported by the library. * Cipher modules:: How to work with cipher modules. * Available cipher modes:: List of cipher modes supported by the library. * Working with cipher handles:: How to perform operations related to cipher handles. * General cipher functions:: General cipher functions independent of cipher handles.  File: gcrypt.info, Node: Available ciphers, Next: Cipher modules, Up: Symmetric cryptography 5.1 Available ciphers ===================== `GCRY_CIPHER_NONE' This is not a real algorithm but used by some functions as error return. The value always evaluates to false. `GCRY_CIPHER_IDEA' This is the IDEA algorithm. The constant is provided but there is currently no implementation for it because the algorithm is patented. `GCRY_CIPHER_3DES' Triple-DES with 3 Keys as EDE. The key size of this algorithm is 168 but you have to pass 192 bits because the most significant bits of each byte are ignored. `GCRY_CIPHER_CAST5' CAST128-5 block cipher algorithm. The key size is 128 bits. `GCRY_CIPHER_BLOWFISH' The blowfish algorithm. The current implementation allows only for a key size of 128 bits. `GCRY_CIPHER_SAFER_SK128' Reserved and not currently implemented. `GCRY_CIPHER_DES_SK' Reserved and not currently implemented. `GCRY_CIPHER_AES' `GCRY_CIPHER_AES128' `GCRY_CIPHER_RIJNDAEL' `GCRY_CIPHER_RIJNDAEL128' AES (Rijndael) with a 128 bit key. `GCRY_CIPHER_AES192' `GCRY_CIPHER_RIJNDAEL128' AES (Rijndael) with a 192 bit key. `GCRY_CIPHER_AES256' `GCRY_CIPHER_RIJNDAEL256' AES (Rijndael) with a 256 bit key. `GCRY_CIPHER_TWOFISH' The Twofish algorithm with a 256 bit key. `GCRY_CIPHER_TWOFISH128' The Twofish algorithm with a 128 bit key. `GCRY_CIPHER_ARCFOUR' An algorithm which is 100% compatible with RSA Inc.'s RC4 algorithm. Note that this is a stream cipher and must be used very carefully to avoid a couple of weaknesses. `GCRY_CIPHER_DES' Standard DES with a 56 bit key. You need to pass 64 bit but the high bits of each byte are ignored. Note, that this is a weak algorithm which can be broken in reasonable time using a brute force approach.  File: gcrypt.info, Node: Cipher modules, Next: Available cipher modes, Prev: Available ciphers, Up: Symmetric cryptography 5.2 Cipher modules ================== Libgcrypt makes it possible to load additional `cipher modules'; these cipher can be used just like the cipher algorithms that are built into the library directly. For an introduction into extension modules, see *Note Modules::. -- Data type: gcry_cipher_spec_t This is the `module specification structure' needed for registering cipher modules, which has to be filled in by the user before it can be used to register a module. It contains the following members: `const char *name' The primary name of the algorithm. `const char **aliases' A list of strings that are `aliases' for the algorithm. The list must be terminated with a NULL element. `gcry_cipher_oid_spec_t *oids' A list of OIDs that are to be associated with the algorithm. The list's last element must have it's `oid' member set to NULL. See below for an explanation of this type. `size_t blocksize' The block size of the algorithm, in bytes. `size_t keylen' The length of the key, in bits. `size_t contextsize' The size of the algorithm-specific `context', that should be allocated for each handle. `gcry_cipher_setkey_t setkey' The function responsible for initializing a handle with a provided key. See below for a description of this type. `gcry_cipher_encrypt_t encrypt' The function responsible for encrypting a single block. See below for a description of this type. `gcry_cipher_decrypt_t decrypt' The function responsible for decrypting a single block. See below for a description of this type. `gcry_cipher_stencrypt_t stencrypt' Like `encrypt', for stream ciphers. See below for a description of this type. `gcry_cipher_stdecrypt_t stdecrypt' Like `decrypt', for stream ciphers. See below for a description of this type. -- Data type: gcry_cipher_oid_spec_t This type is used for associating a user-provided algorithm implementation with certain OIDs. It contains the following members: `const char *oid' Textual representation of the OID. `int mode' Cipher mode for which this OID is valid. -- Data type: gcry_cipher_setkey_t Type for the `setkey' function, defined as: gcry_err_code_t (*gcry_cipher_setkey_t) (void *c, const unsigned char *key, unsigned keylen) -- Data type: gcry_cipher_encrypt_t Type for the `encrypt' function, defined as: gcry_err_code_t (*gcry_cipher_encrypt_t) (void *c, const unsigned char *outbuf, const unsigned char *inbuf) -- Data type: gcry_cipher_decrypt_t Type for the `decrypt' function, defined as: gcry_err_code_t (*gcry_cipher_decrypt_t) (void *c, const unsigned char *outbuf, const unsigned char *inbuf) -- Data type: gcry_cipher_stencrypt_t Type for the `stencrypt' function, defined as: gcry_err_code_t (*gcry_cipher_stencrypt_t) (void *c, const unsigned char *outbuf, const unsigned char *, unsigned int n) -- Data type: gcry_cipher_stdecrypt_t Type for the `stdecrypt' function, defined as: gcry_err_code_t (*gcry_cipher_stdecrypt_t) (void *c, const unsigned char *outbuf, const unsigned char *, unsigned int n) -- Function: gcry_error_t gcry_cipher_register (gcry_cipher_spec_t *CIPHER, unsigned int *algorithm_id, gcry_module_t *MODULE) Register a new cipher module whose specification can be found in CIPHER. On success, a new algorithm ID is stored in ALGORITHM_ID and a pointer representhing this module is stored in MODULE. -- Function: void gcry_cipher_unregister (gcry_module_t MODULE) Unregister the cipher identified by MODULE, which must have been registered with gcry_cipher_register. -- Function: gcry_error_t gcry_cipher_list (int *LIST, int *LIST_LENGTH) Get a list consisting of the IDs of the loaded cipher modules. If LIST is zero, write the number of loaded cipher modules to LIST_LENGTH and return. If LIST is non-zero, the first *LIST_LENGTH algorithm IDs are stored in LIST, which must be of according size. In case there are less cipher modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct number.  File: gcrypt.info, Node: Available cipher modes, Next: Working with cipher handles, Prev: Cipher modules, Up: Symmetric cryptography 5.3 Available cipher modes ========================== `GCRY_CIPHER_MODE_NONE' No mode specified, may be set later using other functions. The value of this constant is always 0. `GCRY_CIPHER_MODE_ECB' Electronic Codebook mode. `GCRY_CIPHER_MODE_CFB' Cipher Feedback mode. `GCRY_CIPHER_MODE_CBC' Cipher Block Chaining mode. `GCRY_CIPHER_MODE_STREAM' Stream mode, only to be used with stream cipher algorithms. `GCRY_CIPHER_MODE_OFB' Outer Feedback mode. `GCRY_CIPHER_MODE_CTR' Counter mode.  File: gcrypt.info, Node: Working with cipher handles, Next: General cipher functions, Prev: Available cipher modes, Up: Symmetric cryptography 5.4 Working with cipher handles =============================== To use a cipher algorithm, you must first allocate an according handle. This is to be done using the open function: -- Function: gcry_error_t gcry_cipher_open (gcry_cipher_hd_t *HD, int ALGO, int MODE, unsigned int FLAGS) This function creates the context handle required for most of the other cipher functions and returns a handle to it in `hd'. In case of an error, an according error code is returned. The ID of algorithm to use must be specified via ALGO. See *Note Available ciphers::, for a list of supported ciphers and the according constants. Besides using the constants directly, the function `gcry_cipher_map_name' may be used to convert the textual name of an algorithm into the according numeric ID. The cipher mode to use must be specified via MODE. See *Note Available cipher modes::, for a list of supported cipher modes and the according constants. Note, that some modes do not work together with all algorithms. The third argument FLAGS can either be passed as `0' or as the bit-wise OR of the following constants. `GCRY_CIPHER_SECURE' Make sure that all operations are allocated in secure memory. This is useful, when the key material is highly confidential. `GCRY_CIPHER_ENABLE_SYNC' This flag enables the CFB sync mode, which is a special feature of Libgcrypt's CFB mode implementation to allow for OpenPGP's CFB variant. See `gcry_cipher_sync'. `GCRY_CIPHER_CBC_CTS' Enable cipher text stealing (CTS) for the CBC mode. Cannot be used simultaneous as GCRY_CIPHER_CBC_MAC `GCRY_CIPHER_CBC_MAC' Compute CBC-MAC keyed checksums. This is the same as CBC mode, but only output the last block. Cannot be used simultaneous as GCRY_CIPHER_CBC_CTS. Use the following function to release an existing handle: -- Function: void gcry_cipher_close (gcry_cipher_hd_t H) This function releases the context created by `gcry_cipher_open'. In order to use a handle for performing cryptographic operations, a `key' has to be set first: -- Function: gcry_error_t gcry_cipher_setkey (gcry_cipher_hd_t H, void *K, size_t L) Set the key K used for encryption or decryption in the context denoted by the handle H. The length L of the key K must match the required length of the algorithm set for this context or be in the allowed range for algorithms with variable key size. The function checks this and returns an error if there is a problem. A caller should always check for an error. Note, this is currently implemented as a macro but may be changed to a function in the future. Most crypto modes requires an initialization vector (IV), which usually is a non-secret random string acting as a kind of salt value. The CTR mode requires a counter, which is also similar to a salt value. To set the IV or CTR, use these functions: -- Function: gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t H, void *K, size_t L) Set the initialization vector used for encryption or decryption. The vector is passed as the buffer K of length L and copied to internal data structures. The function checks that the IV matches the requirement of the selected algorithm and mode. Note, that this is implemented as a macro. -- Function: gcry_error_t gcry_cipher_setctr (gcry_cipher_hd_t H, void *C, size_t L) Set the counter vector used for encryption or decryption. The counter is passed as the buffer C of length L and copied to internal data structures. The function checks that the counter matches the requirement of the selected algorithm (i.e., it must be the same size as the block size). Note, that this is implemented as a macro. -- Function: gcry_error_t gcry_cipher_reset (gcry_cipher_hd_t H) Set the given handle's context back to the state it had after the last call to gcry_cipher_setkey and clear the initialization vector. Note, that gcry_cipher_reset is implemented as a macro. The actual encryption and decryption is done by using one of the following functions. They may be used as often as required to process all the data. -- Function: gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t H, unsigned char *out, size_t OUTSIZE, const unsigned char *IN, size_t INLEN) `gcry_cipher_encrypt' is used to encrypt the data. This function can either work in place or with two buffers. It uses the cipher context already setup and described by the handle H. There are 2 ways to use the function: If IN is passed as `NULL' and INLEN is `0', in-place encryption of the data in OUT or length OUTSIZE takes place. With IN being not `NULL', INLEN bytes are encrypted to the buffer OUT which must have at least a size of INLEN. OUTLEN must be set to the allocated size of OUT, so that the function can check that there is sufficient space. Note, that overlapping buffers are not allowed. Depending on the selected algorithms and encryption mode, the length of the buffers must be a multiple of the block size. The function returns `0' on success or an error code. -- Function: gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t H, unsigned char *out, size_t OUTSIZE, const unsigned char *IN, size_t INLEN) `gcry_cipher_decrypt' is used to decrypt the data. This function can either work in place or with two buffers. It uses the cipher context already setup and described by the handle H. There are 2 ways to use the function: If IN is passed as `NULL' and INLEN is `0', in-place decryption of the data in OUT or length OUTSIZE takes place. With IN being not `NULL', INLEN bytes are decrypted to the buffer OUT which must have at least a size of INLEN. OUTLEN must be set to the allocated size of OUT, so that the function can check that there is sufficient space. Note, that overlapping buffers are not allowed. Depending on the selected algorithms and encryption mode, the length of the buffers must be a multiple of the block size. The function returns `0' on success or an error code. OpenPGP (as defined in RFC-2440) requires a special sync operation in some places, the following function is used for this: -- Function: gcry_error_t gcry_cipher_sync (gcry_cipher_hd_t H) Perform the OpenPGP sync operation on context H. Note, that this is a no-op unless the context was created with the flag `GCRY_CIPHER_ENABLE_SYNC' Some of the described functions are implemented as macros utilizing a catch-all control function. This control function is rarely used directly but there is nothing which would inhibit it: -- Function: gcry_error_t gcry_cipher_ctl (gcry_cipher_hd_t H, int CMD, void *BUFFER, size_t BUFLEN) `gcry_cipher_ctl' controls various aspects of the cipher module and specific cipher contexts. Usually some more specialized functions or macros are used for this purpose. The semantics of the function and its parameters depends on the the command CMD and the passed context handle H. Please see the comments in the source code (`src/global.c') for details. -- Function: gcry_error_t gcry_cipher_info (gcry_cipher_hd_t H, int WHAT, void *BUFFER, size_t *NBYTES) `gcry_cipher_info' is used to retrieve various information about a cipher context or the cipher module in general. Currently no information is available.  File: gcrypt.info, Node: General cipher functions, Prev: Working with cipher handles, Up: Symmetric cryptography 5.5 General cipher functions ============================ To work with the algorithms, several functions are available to map algorithm names to the internal identifiers, as well as ways to retrieve information about an algorithm or the current cipher context. -- Function: gcry_error_t gcry_cipher_algo_info (int ALGO, int WHAT, void *BUFFER, size_t *NBYTES) This function is used to retrieve information on a specific algorithm. You pass the cipher algorithm ID as ALGO and the type of information requested as WHAT. The result is either returned as the return code of the function or copied to the provided BUFFER whose allocated length must be available in an integer variable with the address passed in NBYTES. This variable will also receive the actual used length of the buffer. Here is a list of supported codes for WHAT: `GCRYCTL_GET_KEYLEN:' Return the length of the key. If the algorithm supports multiple key lengths, the maximum supported value is returned. The length is returned as number of octets (bytes) and not as number of bits in NBYTES; BUFFER must be zero. `GCRYCTL_GET_BLKLEN:' Return the block length of the algorithm. The length is returned as a number of octets in NBYTES; BUFFER must be zero. `GCRYCTL_TEST_ALGO:' Returns `0' when the specified algorithm is available for use. BUFFER and NBYTES must be zero. -- Function: const char *gcry_cipher_algo_name (int ALGO) `gcry_cipher_algo_name' returns a string with the name of the cipher algorithm ALGO. If the algorithm is not known or another error occurred, an empty string is returned. This function will never return `NULL'. -- Function: int gcry_cipher_map_name (const char *NAME) `gcry_cipher_map_name' returns the algorithm identifier for the cipher algorithm described by the string NAME. If this algorithm is not available `0' is returned. -- Function: int gcry_cipher_mode_from_oid (const char *STRING) Return the cipher mode associated with an ASN.1 object identifier. The object identifier is expected to be in the IETF-style dotted decimal notation. The function returns `0' for an unknown object identifier or when no mode is associated with it.  File: gcrypt.info, Node: Hashing, Next: Public Key cryptography (I), Prev: Symmetric cryptography, Up: Top 6 Hashing ********* Libgcrypt provides an easy and consistent to use interface for hashing. Hashing is buffered and several hash algorithms can be updated at once. It is possible to calculate a MAC using the same routines. The programming model follows an open/process/close paradigm and is in that similar to other building blocks provided by Libgcrypt. For convenience reasons, a few cyclic redudancy check value operations are also supported. * Menu: * Available hash algorithms:: List of hash algorithms supported by the library. * Hash algorithm modules:: How to work with hash algorithm modules. * Working with hash algorithms:: List of functions related to hashing.  File: gcrypt.info, Node: Available hash algorithms, Next: Hash algorithm modules, Up: Hashing 6.1 Available hash algorithms ============================= `GCRY_MD_NONE' This is not a real algorithm but used by some functions as an error return value. This constant is guaranteed to have the value `0'. `GCRY_MD_SHA1' This is the SHA-1 algorithm which yields a message digest of 20 bytes. `GCRY_MD_RMD160' This is the 160 bit version of the RIPE message digest (RIPE-MD-160). Like SHA-1 it also yields a digest of 20 bytes. `GCRY_MD_MD5' This is the well known MD5 algorithm, which yields a message digest of 16 bytes. `GCRY_MD_MD4' This is the MD4 algorithm, which yields a message digest of 16 bytes. `GCRY_MD_MD2' This is an reserved identifier for MD-2; there is no implementation yet. `GCRY_MD_TIGER' This is the TIGER/192 algorithm which yields a message digest of 24 bytes. `GCRY_MD_HAVAL' This is an reserved for the HAVAL algorithm with 5 passes and 160 bit. It yields a message digest of 20 bytes. Note that there is no implementation yet available. `GCRY_MD_SHA256' This is the SHA-256 algorithm which yields a message digest of 32 bytes. See FIPS 180-2 for the specification. `GCRY_MD_SHA384' This is reserved for SHA-2 with 384 bits. It yields a message digest of 48 bytes. Note that there is no implementation yet available. `GCRY_MD_SHA512' This is reserved for SHA-2 with 512 bits. It yields a message digest of 64 bytes. Note that there is no implementation yet available. `GCRY_MD_CRC32' This is the ISO 3309 and ITU-T V.42 cyclic redundancy check. It yields an output of 4 bytes. `GCRY_MD_CRC32_RFC1510' This is the above cyclic redundancy check function, as modified by RFC 1510. It yields an output of 4 bytes. `GCRY_MD_CRC24_RFC2440' This is the OpenPGP cyclic redundancy check function. It yields an output of 3 bytes.  File: gcrypt.info, Node: Hash algorithm modules, Next: Working with hash algorithms, Prev: Available hash algorithms, Up: Hashing 6.2 Hash algorithm modules ========================== Libgcrypt makes it possible to load additional `message digest modules'; these cipher can be used just like the message digest algorithms that are built into the library directly. For an introduction into extension modules, see *Note Modules::. -- Data type: gcry_md_spec_t This is the `module specification structure' needed for registering message digest modules, which has to be filled in by the user before it can be used to register a module. It contains the following members: `const char *name' The primary name of this algorithm. `unsigned char *asnoid' Array of bytes that form the ASN OID. `int asnlen' Length of bytes in `asnoid'. `gcry_md_oid_spec_t *oids' A list of OIDs that are to be associated with the algorithm. The list's last element must have it's `oid' member set to NULL. See below for an explanation of this type. See below for an explanation of this type. `int mdlen' Length of the message digest algorithm. See below for an explanation of this type. `gcry_md_init_t init' The function responsible for initializing a handle. See below for an explanation of this type. `gcry_md_write_t write' The function responsible for writing data into a message digest context. See below for an explanation of this type. `gcry_md_final_t final' The function responsible for `finalizing' a message digest context. See below for an explanation of this type. `gcry_md_read_t read' The function reponsible for reading out a message digest result. See below for an explanation of this type. `size_t contextsize' The size of the algorithm-specific `context', that should be allocated for each handle. -- Data type: gcry_md_oid_spec_t This type is used for associating a user-provided algorithm implementation with certain OIDs. It contains the following members: `const char *oidstring' Textual representation of the OID. -- Data type: gcry_md_init_t Type for the `init' function, defined as: void (*gcry_md_init_t) (void *c) -- Data type: gcry_md_write_t Type for the `write' function, defined as: void (*gcry_md_write_t) (void *c, unsigned char *buf, size_t nbytes) -- Data type: gcry_md_final_t Type for the `final' function, defined as: void (*gcry_md_final_t) (void *c) -- Data type: gcry_md_read_t Type for the `read' function, defined as: unsigned char *(*gcry_md_read_t) (void *c) -- Function: gcry_error_t gcry_md_register (gcry_md_spec_t *DIGEST, unsigned int *algorithm_id, gcry_module_t *MODULE) Register a new digest module whose specification can be found in DIGEST. On success, a new algorithm ID is stored in ALGORITHM_ID and a pointer representhing this module is stored in MODULE. -- Function: void gcry_md_unregister (gcry_module_t MODULE) Unregister the digest identified by MODULE, which must have been registered with gcry_md_register. -- Function: gcry_error_t gcry_md_list (int *LIST, int *LIST_LENGTH) Get a list consisting of the IDs of the loaded message digest modules. If LIST is zero, write the number of loaded message digest modules to LIST_LENGTH and return. If LIST is non-zero, the first *LIST_LENGTH algorithm IDs are stored in LIST, which must be of according size. In case there are less message digests modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct number.  File: gcrypt.info, Node: Working with hash algorithms, Prev: Hash algorithm modules, Up: Hashing 6.3 Working with hash algorithms ================================ To use most of these function it is necessary to create a context; this is done using: -- Function: gcry_error_t gcry_md_open (gcry_md_hd_t *HD, int ALGO, unsigned int FLAGS) Create a message digest object for algorithm ALGO. FLAGS may be given as an bitwise OR of constants described below. ALGO may be given as `0' if the algorithms to use are later set using `gcry_md_enable'. HD is guaranteed to either receive a valid handle or NULL. For a list of supported algorithms, see *Note Available hash algorithms::. The flags allowed for MODE are: `GCRY_MD_FLAG_SECURE' Allocate all buffers and the resulting digest in "secure memory". Use this is the hashed data is highly confidential. `GCRY_MD_FLAG_HMAC' Turn the algorithm into a HMAC message authentication algorithm. This does only work if just one algorithm is enabled for the handle and SHA-384 and SHA512 is not used. Note that the function `gcry_md_setkey' must be used set the MAC key. If you want CBC message authentication codes based on a cipher, see *Note Working with cipher handles::. You may use the function `gcry_md_is_enabled' to later check whether an algorithm has been enabled. If you want to calculate several hash algorithms at the same time, you have to use the following function right after the `gcry_md_open': -- Function: gcry_error_t gcry_md_enable (gcry_md_hd_t H, int ALGO) Add the message digest algorithm ALGO to the digest object described by handle H. Duplicated enabling of algorithms is detected and ignored. If the flag `GCRY_MD_FLAG_HMAC' was used, the key for the MAC must be set using the function: -- Function: gcry_error_t gcry_md_setkey (gcry_md_hd_t H, const void *KEY, size_t KEYLEN) For use with the HMAC feature, set the MAC key to the value of KEY of length KEYLEN. After you are done with the hash calculation, you should release the resources by using: -- Function: void gcry_md_close (gcry_md_hd_t H) Release all resources of hash context H. H should not be used after a call to this function. A `NULL' passed as H is ignored. Often you have to do several hash operations using the same algorithm. To avoid the overhead of creating and releasing context, a reset function is provided: -- Function: void gcry_md_reset (gcry_md_hd_t H) Reset the current context to its initial state. This is effectively identical to a close followed by an open and enabling all currently active algorithms. Often it is necessary to start hashing some data and than continue to hash different data. To avoid hashing the same data several times (which might not even be possible if the data is received from a pipe), a snapshot of the current hash context can be taken and turned into a new context: -- Function: gcry_error_t gcry_md_copy (gcry_md_hd_t *HANDLE_DST, gcry_md_hd_t HANDLE_SRC) Create a new digest object as an exact copy of the object described by handle HANDLE_SRC and store it in HANDLE_DST. The context is not reset and you can continue to hash data using this context and independently using the original context. Now that we have prepared everything to calculate hashes, its time to see how it is actually done. There are 2 ways for this, one to update the hash with a block of memory and one macro to update the hash by just one character. Both may be used intermixed. -- Function: void gcry_md_write (gcry_md_hd_t H, const void *BUFFER, size_t LENGTH) Pass LENGTH bytes of the data in BUFFER to the digest object with handle H to update the digest values. This function should be used for large blocks of data. -- Function: void gcry_md_putc (gcry_md_hd_t H, int C) Pass the byte in C to the digest object with handle H to update the digest value. This is an efficient function, implemented as a macro to buffer the data before an actual update. The semantics of the hash functions don't allow to read out intermediate message digests because the calculation must be finalized fist. This finalization may for example include the number of bytes hashed in the message digest. -- Function: void gcry_md_final (gcry_md_hd_t H) Finalize the message digest calculation. This is not really needed because `gcry_md_read' does this implicitly. After this has been done no further updates (by means of `gcry_md_write' or `gcry_md_putc' are allowed. Only the first call to this function has an effect. It is implemented as a macro. The way to read out the calculated message digest is by using the function: -- Function: unsigned char *gcry_md_read (gcry_md_hd_t H, int ALGO) `gcry_md_read' returns the message digest after finalizing the calculation. This function may be used as often as required but it will always return the same value for one handle. The returned message digest is allocated within the message context and therefore valid until the handle is released or reseted (using `gcry_md_close' or `gcry_md_reset'. ALGO may be given as 0 to return the only enabled message digest or it may specify one of the enabled algorithms. The function does return `NULL' if the requested algorithm has not been enabled. Because it is often necessary to get the message digest of one block of memory, a fast convenience function is available for this task: -- Function: void gcry_md_hash_buffer (int ALGO, void *DIGEST, const cvoid *BUFFER, size_t LENGTH); `gcry_md_hash_buffer' is a shortcut function to calculate a message digest of a buffer. This function does not require a context and immediately returns the message digest of the LENGTH bytes at BUFFER. DIGEST must be allocated by the caller, large enough to hold the message digest yielded by the the specified algorithm ALGO. This required size may be obtained by using the function `gcry_md_get_algo_dlen'. Note, that this function will abort the process if an unavailable algorithm is used. Hash algorithms are identified by internal algorithm numbers (see `gcry_md_open' for a list. However, in most applications they are used by names, so 2 functions are available to map between string representations and hash algorithm identifiers. -- Function: const char *gcry_md_algo_name (int ALGO) Map the digest algorithm id ALGO to a string representation of the algorithm name. For unknown algorithms this functions returns an empty string. This function should not be used to test for the availability of an algorithm. -- Function: int gcry_md_map_name (const char *NAME) Map the algorithm with NAME to a digest algorithm identifier. Returns 0 if the algorithm name is not known. Names representing ASN.1 object identifiers are recognized if the IETF dotted format is used and the OID is prefixed with either "`oid.'" or "`OID.'". For a list of supported OIDs, see the source code at `cipher/md.c'. This function should not be used to test for the availability of an algorithm. -- Function: gcry_error_t gcry_md_get_asnoid (int ALGO, void *BUFFER, size_t *LENGTH) Return an DER encoded ASN.1 OID for the algorithm ALGO in the user allocated BUFFER. LENGTH must point to variable with the available size of BUFFER and receives after return the actual size of the returned OID. The returned error code may be `GPG_ERR_TOO_SHORT' if the provided buffer is to short to receive the OID; it is possible to call the function with `NULL' for BUFFER to have it only return the required size. The function returns 0 on success. To test whether an algorithm is actually available for use, the following macro should be used: -- Function: gcry_error_t gcry_md_test_algo (int ALGO) The macro returns 0 if the algorithm ALGO is available for use. If the length of a message digest is not known, it can be retrieved using the following function: -- Function: unsigned int gcry_md_get_algo_dlen (int ALGO) Retrieve the length in bytes of the digest yielded by algorithm ALGO. This is often used prior to `gcry_md_read' to allocate sufficient memory for the digest. In some situations it might be hard to remember the algorithm used for the ongoing hashing. The following function might be used to get that information: -- Function: int gcry_md_get_algo (gcry_md_hd_t H) Retrieve the algorithm used with the handle H. Note, that this does not work reliable if more than one algorithm is enabled in H. The following macro might also be useful: -- Function: int gcry_md_is_secure (gcry_md_hd_t H) This function returns true when the digest object H is allocated in "secure memory"; i.e. H was created with the `GCRY_MD_FLAG_SECURE'. -- Function: int gcry_md_is_enabled (gcry_md_hd_t H, int ALGO) This function returns true when the algorithm ALGO has been enabled for the digest object H. Tracking bugs related to hashing is often a cumbersome task which requires to add a lot of printf statements into the code. Libgcrypt provides an easy way to avoid this. The actual data hashed can be written to files on request. The following 2 macros should be used to implement such a debugging facility: -- Function: void gcry_md_start_debug (gcry_md_hd_t H, const char *SUFFIX) Enable debugging for the digest object with handle H. This creates create files named `dbgmd-.' while doing the actual hashing. SUFFIX is the string part in the filename. The number is a counter incremented for each new hashing. The data in the file is the raw data as passed to `gcry_md_write' or `gcry_md_putc'. -- Function: void gcry_md_stop_debug (gcry_md_hd_t H, int RESERVED) Stop debugging on handle H. RESERVED should be specified as 0. This function is usually not required because `gcry_md_close' does implicitly stop debugging.  File: gcrypt.info, Node: Public Key cryptography (I), Next: Public Key cryptography (II), Prev: Hashing, Up: Top 7 Public Key cryptography (I) ***************************** Public key cryptography, also known as asymmetric cryptography, is an easy way for key management and to provide digital signatures. Libgcrypt provides two completely different interfaces to public key cryptography, this chapter explains the one based on S-expressions. * Menu: * Available algorithms:: Algorithms supported by the library. * Used S-expressions:: Introduction into the used S-expression. * Public key modules:: How to work with public key modules. * Cryptographic Functions:: Functions for performing the cryptographic actions. * General public-key related Functions:: General functions, not implementing any cryptography.  File: gcrypt.info, Node: Available algorithms, Next: Used S-expressions, Up: Public Key cryptography (I) 7.1 Available algorithms ======================== Libgcrypt supports the RSA (Rivest-Shamir-Adleman) algorithms as well as DSA (Digital Signature Algorithm) and ElGamal. The versatile interface allows to add more algorithms in the future.  File: gcrypt.info, Node: Used S-expressions, Next: Public key modules, Prev: Available algorithms, Up: Public Key cryptography (I) 7.2 Used S-expressions ====================== Libgcrypt's API for asymmetric cryptography is based on data structures called S-expressions (see XXXX) and does not work with contexts as most of the other building blocks of Libgcrypt do. The following information are stored in S-expressions: keys plain text data encrypted data signatures To describe how Libgcrypt expect keys, we use some examples. Note that words in uppercase indicate parameters whereas lowercase words are literals. (private-key (dsa (p P-MPI) (q Q-MPI) (g G-MPI) (y Y-MPI) (x X-MPI))) This specifies a DSA private key with the following parameters: P-MPI DSA prime p. Q-MPI DSA group order q (which is a prime divisor of p-1). G-MPI DSA group generator g. Y-MPI DSA public key value y = g^x \bmod p. X-MPI DSA secret exponent x. All the MPI values are expected to be in `GCRYMPI_FMT_USG' format. The public key is similar with "private-key" replaced by "public-key" and no X-MPI. An easy way to create such an S-expressions is by using `gcry_sexp_build' which allows to pass a string with printf-like escapes to insert MPI values. Here is an example for an RSA key: (private-key (rsa (n N-MPI) (e E-MPI) (d D-MPI) (p P-MPI) (q Q-MPI) (u U-MPI) with N-MPI RSA public modulus n. E-MPI RSA public exponent e. D-MPI RSA secret exponent d = e^-1 \bmod (p-1)(q-1). P-MPI RSA secret prime p. Q-MPI RSA secret prime q with q > p. U-MPI multiplicative inverse u = p^-1 \bmod q.  File: gcrypt.info, Node: Public key modules, Next: Cryptographic Functions, Prev: Used S-expressions, Up: Public Key cryptography (I) 7.3 Public key modules ====================== Libgcrypt makes it possible to load additional `public key modules'; these public key algorithms can be used just like the algorithms that are built into the library directly. For an introduction into extension modules, see *Note Modules::. -- Data type: gcry_pk_spec_t This is the `module specification structure' needed for registering public key modules, which has to be filled in by the user before it can be used to register a module. It contains the following members: `const char *name' The primary name of this algorithm. `char **aliases' A list of strings that are `aliases' for the algorithm. The list musdt be terminanted with a NULL element. `const char *elements_pkey' String containing the one-letter names of the MPI values contained in a public key. `const char *element_skey' String containing the one-letter names of the MPI values contained in a secret key. `const char *elements_enc' String containing the one-letter names of the MPI values that are the result of an encryption operation using this algorithm. `const char *elements_sig' String containing the one-letter names of the MPI values that are the result of a sign operation using this algorithm. `const char *elements_grip' String containing the one-letter names of the MPI values that are to be included in the `key grip'. `int use' The bitwise-OR of the following flags, depending on the abilities of the algortihm: `GCRY_PK_USAGE_SIGN' The algorithm supports signing and verifying of data. `GCRY_PK_USAGE_ENCR' The algorithm supports the encryption and decryption of data. `gcry_pk_generate_t generate' The function responsible for generating a new key pair. See below for a description of this type. `gcry_pk_check_secret_key_t check_secret_key' The function responsible for checking the sanity of a provided secret key. See below for a description of this type. `gcry_pk_encrypt_t encrypt' The function responsible for encrypting data. See below for a description of this type. `gcry_pk_decrypt_t decrypt' The function responsible for decrypting data. See below for a description of this type. `gcry_pk_sign_t sign' The function reponsible for signing data. See below for a description of this type. `gcry_pk_verify_t verify' The function responsible for verifying that the provided signature matches the provided data. See below for a description of this type. `gcry_pk_get_nbits_t get_nbits' The function reponsible for returning the number of bits of a provided key. See below for a description of this type. -- Data type: gcry_pk_generate_t Type for the `generate' function, defined as: gcry_err_code_t (*gcry_pk_generate_t) (int algo, unsigned int nbits, unsigned long use_e, gcry_mpi_t *skey, gcry_mpi_t **retfactors) -- Data type: gcry_pk_check_secret_key_t Type for the `check_secret_key' function, defined as: gcry_err_code_t (*gcry_pk_check_secret_key_t) (int algo, gcry_mpi_t *skey) -- Data type: gcry_pk_encrypt_t Type for the `encrypt' function, defined as: gcry_err_code_t (*gcry_pk_encrypt_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *pkey, int flags) -- Data type: gcry_pk_decrypt_t Type for the `decrypt' function, defined as: gcry_err_code_t (*gcry_pk_decrypt_t) (int algo, gcry_mpi_t *result, gcry_mpi_t *data, gcry_mpi_t *skey, int flags) -- Data type: gcry_pk_sign_t Type for the `sign' function, defined as: gcry_err_code_t (*gcry_pk_sign_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey) -- Data type: gcry_pk_verify_t Type for the `verify' function, defined as: gcry_err_code_t (*gcry_pk_verify_t) (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey, int (*cmp) (void *, gcry_mpi_t), void *opaquev) -- Data type: gcry_pk_get_nbits_t Type for the `get_nbits' function, defined as: unsigned (*gcry_pk_get_nbits_t) (int algo, gcry_mpi_t *pkey) -- Function: gcry_error_t gcry_pk_register (gcry_pk_spec_t *PUBKEY, unsigned int *algorithm_id, gcry_module_t *MODULE) Register a new public key module whose specification can be found in PUBKEY. On success, a new algorithm ID is stored in ALGORITHM_ID and a pointer representhing this module is stored in MODULE. -- Function: void gcry_pk_unregister (gcry_module_t MODULE) Unregister the public key module identified by MODULE, which must have been registered with gcry_pk_register. -- Function: gcry_error_t gcry_pk_list (int *LIST, int *LIST_LENGTH) Get a list consisting of the IDs of the loaded pubkey modules. If LIST is zero, write the number of loaded pubkey modules to LIST_LENGTH and return. If LIST is non-zero, the first *LIST_LENGTH algorithm IDs are stored in LIST, which must be of according size. In case there are less pubkey modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct number.  File: gcrypt.info, Node: Cryptographic Functions, Next: General public-key related Functions, Prev: Public key modules, Up: Public Key cryptography (I) 7.4 Cryptographic Functions =========================== Note, that we will in future allow to use keys without p,q and u specified and may also support other parameters for performance reasons. Some functions operating on S-expressions support `flags', that influence the operation. These flags have to be listed in a sub-S-expression named `flags'; the following flags are known: PKCS1 Use PKCS#1 block type 2 padding. NO-BLINDING Do not use a technique called `blinding', which is used by default in order to prevent leaking of secret information. Blinding is only implemented by RSA, but it might be implemented by other algorithms in the future as well, when necessary. Now that we know the key basics, we can carry on and explain how to encrypt and decrypt data. In almost all cases the data is a random session key which is in turn used for the actual encryption of the real data. There are 2 functions to do this: -- Function: gcry_error_t gcry_pk_encrypt (gcry_sexp_t *R_CIPH, gcry_sexp_t DATA, gcry_sexp_t PKEY) Obviously a public key must be provided for encryption. It is expected as an appropriate S-expression (see above) in PKEY. The data to be encrypted can either be in the simple old format, which is a very simple S-expression consisting only of one MPI, or it may be a more complex S-expression which also allows to specify flags for operation, like e.g. padding rules. If you don't want to let Libgcrypt handle the padding, you must pass an appropriate MPI using this expression for DATA: (data (flags raw) (value MPI)) This has the same semantics as the old style MPI only way. MPI is the actual data, already padded appropriate for your protocol. Most systems however use PKCS#1 padding and so you can use this S-expression for DATA: (data (flags pkcs1) (value BLOCK)) Here, the "flags" list has the "pkcs1" flag which let the function know that it should provide PKCS#1 block type 2 padding. The actual data to be encrypted is passed as a string of octets in BLOCK. The function checks that this data actually can be used with the given key, does the padding and encrypts it. If the function could successfully perform the encryption, the return value will be 0 and a a new S-expression with the encrypted result is allocated and assign to the variable at the address of R_CIPH. The caller is responsible to release this value using `gcry_sexp_release'. In case of an error, an error code is returned and R_CIPH will be set to `NULL'. The returned S-expression has this format when used with RSA: (enc-val (rsa (a A-MPI))) Where A-MPI is an MPI with the result of the RSA operation. When using the ElGamal algorithm, the return value will have this format: (enc-val (elg (a A-MPI) (b B-MPI))) Where A-MPI and B-MPI are MPIs with the result of the ElGamal encryption operation. -- Function: gcry_error_t gcry_pk_decrypt (gcry_sexp_t *R_PLAIN, gcry_sexp_t DATA, gcry_sexp_t SKEY) Obviously a private key must be provided for decryption. It is expected as an appropriate S-expression (see above) in SKEY. The data to be decrypted must match the format of the result as returned by `gcry_pk_encrypt', but should be enlarged with a `flags' element: (enc-val (flags) (elg (a A-MPI) (b B-MPI))) Note, that this function currently does not know of any padding methods and the caller must do any un-padding on his own. The function returns 0 on success or an error code. The variable at the address of R_PLAIN will be set to NULL on error or receive the decrypted value on success. The format of R_PLAIN is a simple S-expression part (i.e. not a valid one) with just one MPI if there was no `flags' element in DATA; if at least an empty `flags' is passed in DATA, the format is: (value PLAINTEXT) Another operation commonly performed using public key cryptography is signing data. In some sense this is even more important than encryption because digital signatures are an important instrument for key management. Libgcrypt supports digital signatures using 2 functions, similar to the encryption functions: -- Function: gcry_error_t gcry_pk_sign (gcry_sexp_t *R_SIG, gcry_sexp_t DATA, gcry_sexp_t SKEY) This function creates a digital signature for DATA using the private key SKEY and place it into the variable at the address of R_SIG. DATA may either be the simple old style S-expression with just one MPI or a modern and more versatile S-expression which allows to let Libgcrypt handle padding: (data (flags pkcs1) (hash HASH-ALGO BLOCK)) This example requests to sign the data in BLOCK after applying PKCS#1 block type 1 style padding. HASH-ALGO is a string with the hash algorithm to be encoded into the signature, this may be any hash algorithm name as supported by Libgcrypt. Most likely, this will be "sha1", "rmd160" or "md5". It is obvious that the length of BLOCK must match the size of that message digests; the function checks that this and other constraints are valid. If PKCS#1 padding is not required (because the caller does already provide a padded value), either the old format or better the following format should be used: (data (flags raw) (value MPI)) Here, the data to be signed is directly given as an MPI. The signature is returned as a newly allocated S-expression in R_SIG using this format for RSA: (sig-val (rsa (s S-MPI))) Where S-MPI is the result of the RSA sign operation. For DSA the S-expression returned is: (sig-val (dsa (r R-MPI) (s S-MPI))) Where R-MPI and S-MPI are the result of the DSA sign operation. For ElGamal signing (which is slow, yields large numbers and probably is not as secure as the other algorithms), the same format is used with "elg" replacing "dsa". The operation most commonly used is definitely the verification of a signature. Libgcrypt provides this function: -- Function: gcry_error_t gcry_pk_verify (gcry_sexp_t SIG, gcry_sexp_t DATA, gcry_sexp_t PKEY) This is used to check whether the signature SIG matches the DATA. The public key PKEY must be provided to perform this verification. This function is similar in its parameters to `gcry_pk_sign' with the exceptions that the public key is used instead of the private key and that no signature is created but a signature, in a format as created by `gcry_pk_sign', is passed to the function in SIG. The result is 0 for success (i.e. the data matches the signature), or an error code where the most relevant code is `GCRYERR_BAD_SIGNATURE' to indicate that the signature does not match the provided data.  File: gcrypt.info, Node: General public-key related Functions, Prev: Cryptographic Functions, Up: Public Key cryptography (I) 7.5 General public-key related Functions ======================================== A couple of utility functions are available to retrieve the length of the key, map algorithm identifiers and perform sanity checks: -- Function: const char * gcry_pk_algo_name (int ALGO) Map the public key algorithm id ALGO to a string representation of the algorithm name. For unknown algorithms this functions returns an empty string. -- Function: int gcry_pk_map_name (const char *NAME) Map the algorithm NAME to a public key algorithm Id. Returns 0 if the algorithm name is not known. -- Function: int gcry_pk_test_algo (int ALGO) Return 0 if the public key algorithm ALGO is available for use. Note, that this is implemented as a macro. -- Function: unsigned int gcry_pk_get_nbits (gcry_sexp_t KEY) Return what is commonly referred as the key length for the given public or private in KEY. -- Function: unsigned char * gcry_pk_get_keygrip (gcry_sexp_t KEY, unsigned char *ARRAY) Return the so called "keygrip" which is the SHA-1 hash of the public key parameters expressed in a way depended on the algorithm. ARRAY must either provide space for 20 bytes or `NULL;'. In the latter case a newly allocated array of that size is returned. On success a pointer to the newly allocated space or to ARRAY is returned. `NULL' is returned to indicate an error which is most likely an unknown algorithm or one where a "keygrip" has not yet been defined. The function accepts public or secret keys in KEY. -- Function: gcry_error_t gcry_pk_testkey (gcry_sexp_t KEY) Return zero if the private key KEY is `sane', an error code otherwise. Note, that it is not possible to chek the `saneness' of a public key. -- Function: int gcry_pk_algo_info (int ALGO, int WHAT, void *BUFFER, size_t *NBYTES) Depending on the value of WHAT return various information about the public key algorithm with the id ALGO. Note, that the function returns `-1' on error and the actual error code must be retrieved using the function `gcry_errno'. The currently defined values for WHAT are: `GCRYCTL_TEST_ALGO:' Return 0 when the specified algorithm is available for use. BUFFER must be `NULL', NBYTES may be passed as `NULL' or point to a variable with the required usage of the algorithm. This may be 0 for "don't care" or the bit-wise OR of these flags: `GCRY_PK_USAGE_SIGN' Algorithm is usable for signing. `GCRY_PK_USAGE_ENCR' Algorithm is usable for encryption. `GCRYCTL_GET_ALGO_USAGE:' Return the usage flags for the given algorithm. An invalid algorithm return 0. Disabled algorithms are ignored here because we want to know whether the algorithm is at all capable of a certain usage. `GCRYCTL_GET_ALGO_NPKEY' Return the number of elements the public key for algorithm ALGO consist of. Return 0 for an unknown algorithm. `GCRYCTL_GET_ALGO_NSKEY' Return the number of elements the private key for algorithm ALGO consist of. Note that this value is always larger than that of the public key. Return 0 for an unknown algorithm. `GCRYCTL_GET_ALGO_NSIGN' Return the number of elements a signature created with the algorithm ALGO consists of. Return 0 for an unknown algorithm or for an algorithm not capable of creating signatures. `GCRYCTL_GET_ALGO_NENC' Return the number of elements a encrypted message created with the algorithm ALGO consists of. Return 0 for an unknown algorithm or for an algorithm not capable of encryption. Please note that parameters not required should be passed as `NULL'. -- Function: gcry_error_t gcry_pk_ctl (int CMD, void *BUFFER, size_t BUFLEN) This is a general purpose function to perform certain control operations. CMD controls what is to be done. The return value is 0 for success or an error code. Currently supported values for CMD are: `GCRYCTL_DISABLE_ALGO' Disable the algorithm given as an algorithm id in BUFFER. BUFFER must point to an `int' variable with the algorithm id and BUFLEN must have the value `sizeof (int)'. Libgcrypt also provides a function for generating public key pairs: -- Function: gcry_error_t gcry_pk_genkey (gcry_sexp_t *R_KEY, gcry_sexp_t PARMS) This function create a new public key pair using information given in the S-expression PARMS and stores the private and the public key in one new S-expression at the address given by R_KEY. In case of an error, R_KEY is set to `NULL'. The return code is 0 for success or an error code otherwise. Here is an example for PARMS for creating a 1024 bit RSA key: (genkey (rsa (nbits 4:1024))) To create an ElGamal key, substitute "elg" for "rsa" and to create a DSA key use "dsa". Valid ranges for the key length depend on the algorithms; all commonly used key lengths are supported. Currently supported parameters are: `nbits' This is always required to specify the length of the key. The argument is a string with a number in C-notation. `rsa-use-e' This is only used with RSA to give a hint for the public exponent. The value will be used as a base to test for a usable exponent. Some values are special: `0' Use a secure and fast value. This is currently the number 41. `1' Use a secure value as required by some specification. This is currently the number 65537. `2' Reserved If this parameter is not used, Libgcrypt uses for historic reasons 65537. The key pair is returned in a format depending on the algorithm. Both private and public keys are returned in one container and may be accompanied by some miscellaneous information. As an example, here is what the ElGamal key generation returns: (key-data (public-key (elg (p P-MPI) (g G-MPI) (y Y-MPI))) (private-key (elg (p P-MPI) (g G-MPI) (y Y-MPI) (x X-MPI))) (misc-key-info (pm1-factors N1 N2 ... NN))) As you can see, some of the information is duplicated, but this provides an easy way to extract either the public or the private key. Note that the order of the elements is not defined, e.g. the private key may be stored before the public key. N1 N2 ... NN is a list of prime numbers used to composite P-MPI; this is in general not a very useful information.  File: gcrypt.info, Node: Public Key cryptography (II), Next: Random Numbers, Prev: Public Key cryptography (I), Up: Top 8 Public Key cryptography (II) ****************************** This chapter documents the alternative interface to asymmetric cryptography (ac) that is not based on S-expressions, but on native C data structures. As opposed to the pk interface described in the former chapter, this one follows an open/use/close paradigm like other building blocks of the library. * Menu: * Available asymmetric algorithms:: List of algorithms supported by the library. * Working with sets of data:: How to work with sets of data. * Working with handles:: How to use handles. * Working with keys:: How to work with keys. * Using cryptographic functions:: How to perform cryptographic operations. * Handle-independent functions:: General functions independent of handles.  File: gcrypt.info, Node: Available asymmetric algorithms, Next: Working with sets of data, Up: Public Key cryptography (II) 8.1 Available asymmetric algorithms =================================== Libgcrypt supports the RSA (Rivest-Shamir-Adleman) algorithms as well as DSA (Digital Signature Algorithm) and ElGamal. The versatile interface allows to add more algorithms in the future. -- Data type: gcry_ac_id_t The following constants are defined for this type: `GCRY_AC_RSA' Riven-Shamir-Adleman `GCRY_AC_DSA' Digital Signature Algorithm `GCRY_AC_ELG' ElGamal `GCRY_AC_ELG_E' ElGamal, encryption only.  File: gcrypt.info, Node: Working with sets of data, Next: Working with handles, Prev: Available asymmetric algorithms, Up: Public Key cryptography (II) 8.2 Working with sets of data ============================= In the context of this interface the term `data set' refers to a list of `named MPI values' that is used by functions performing cryptographic operations. Such data sets are used for representing keys, since keys simply consist of a variable amount of numbers. Furthermore some functions return data sets to the caller that are to be provided to other functions. This section documents the data types, symbols and functions that are relevant for working with such data sets. -- Data type: gcry_ac_data_t A data set, that is simply a list of named MPI values. The following flags are supported: `GCRY_AC_FLAG_DEALLOC' Used for storing data in a data set. If given, the data will be released by the library. `GCRY_AC_FLAG_COPY' Used for storing/retrieving data in/from a data set. If given, the library will create copies of the provided/contained data, which will then be given to the user/associated with the data set. -- Function: gcry_error_t gcry_ac_data_new (gcry_ac_data_t *DATA) Creates a new, empty data set and stores it in DATA. -- Function: void gcry_ac_data_destroy (gcry_ac_data_t DATA) Destroys the data set DATA. -- Function: gcry_error_t gcry_ac_data_set (gcry_ac_data_t DATA, unsigned int FLAGS, char *NAME, gcry_mpi_t MPI) Add the value MPI to DATA with the label NAME. If FLAGS contains GCRY_AC_FLAG_DATA_COPY, the data set will contain copies of NAME and MPI. If FLAGS contains GCRY_AC_FLAG_DATA_DEALLOC or GCRY_AC_FLAG_DATA_COPY, the values contained in the data set will be deallocated when they are to be removed from the data set. -- Function: gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *DATA_CP, gcry_ac_data_t DATA) Create a copy of the data set DATA and store it in DATA_CP. -- Function: unsigned int gcry_ac_data_length (gcry_ac_data_t DATA) Returns the number of named MPI values inside of the data set DATA. -- Function: gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t DATA, unsigned int FLAGS, char *NAME, gcry_mpi_t *MPI) Store the value labelled with NAME found in DATA in MPI. If FLAGS contains GCRY_AC_FLAG_COPY, store a copy of the MPI value contained in the data set. MPI may be NULL. -- Function: gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t DATA, unsigned int flags, unsigned int INDEX, const char **NAME, gcry_mpi_t *MPI) Stores in NAME and MPI the named MPI value contained in the data set DATA with the index IDX. If FLAGS contains GCRY_AC_FLAG_COPY, store copies of the values contained in the data set. NAME or MPI may be NULL. -- Function: void gcry_ac_data_clear (gcry_ac_data_t DATA) Destroys any values contained in the data set DATA.  File: gcrypt.info, Node: Working with handles, Next: Working with keys, Prev: Working with sets of data, Up: Public Key cryptography (II) 8.3 Working with handles ======================== In order to use an algorithm, an according handle must be created. This is done using the following function: -- Function: gcry_error_t gcry_ac_open (gcry_ac_handle_t *HANDLE, int ALGORITHM, int FLAGS) Creates a new handle for the algorithm ALGORITHM and stores it in HANDLE. FLAGS is not used yet. ALGORITHM must be a valid algorithm ID, see *Note Available algorithms::, for a list of supported algorithms and the according constants. Besides using the listed constants directly, the functions `gcry_ac_name_to_id' may be used to convert the textual name of an algorithm into the according numeric ID. -- Function: void gcry_ac_close (gcry_ac_handle_t HANDLE) Destroys the handle HANDLE.  File: gcrypt.info, Node: Working with keys, Next: Using cryptographic functions, Prev: Working with handles, Up: Public Key cryptography (II) 8.4 Working with keys ===================== -- Data type: gcry_ac_key_type_t Defined constants: `GCRY_AC_KEY_TYPE_SECRET' Specifies a secret key. `GCRY_AC_KEY_TYPE_PUBLIC' Specifies a public key. -- Data type: gcry_ac_key_t This type represents a single `key', either a secret one or a public one. -- Data type: gcry_ac_key_pair_t This type represents a `key pair' containing a secret and a public key. Key data structures can be created in two different ways; a new key pair can be generated, resulting in ready-to-use key. Alternatively a key can be initialized from a given data set. -- Function: gcry_error_t gcry_ac_key_init (gcry_ac_key_t *KEY, gcry_ac_handle_t HANDLE, gcry_ac_key_type_t TYPE, gcry_ac_data_t DATA) Creates a new key of type TYPE, consisting of the MPI values contained in the data set DATA and stores it in KEY. -- Function: gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t HANDLE, unsigned int NBITS, void *KEY_SPEC, gcry_ac_key_pair_t *KEY_PAIR, gcry_mpi_t **MISC_DATA) Generates a new key pair via the handle HANDLE of NBITS