var searchIndex = {}; searchIndex["ntru"] = {"doc":"NTRUEncrypt implementation for Rust","items":[[5,"generate_key_pair","ntru","Key generation",null,{"inputs":[{"name":"ntruencparams"},{"name":"ntrurandcontext"}],"output":{"name":"result"}}],[5,"encrypt","","Encrypts a message",null,null],[5,"decrypt","","Decrypts a message.",null,null],[0,"types","","NTRUEncrypt type definitions",null,null],[3,"NtruIntPoly","ntru::types","A polynomial with integer coefficients.",null,null],[3,"NtruTernPoly","","A ternary polynomial, i.e. all coefficients are equal to -1, 0, or 1.",null,null],[3,"NtruProdPoly","","A product-form polynomial, i.e. a polynomial of the form f1*f2+f3 where f1,f2,f3 are very\nsparsely populated ternary polynomials.",null,null],[3,"NtruPrivPoly","","Private polynomial, can be ternary or product-form",null,null],[3,"NtruEncPrivKey","","NtruEncrypt private key",null,null],[3,"NtruEncPubKey","","NtruEncrypt public key",null,null],[3,"NtruEncKeyPair","","NtruEncrypt key pair",null,null],[4,"NtruError","","The error enum",null,null],[13,"OutOfMemory","","Out of memory error.",0,null],[13,"Prng","","Error in the random number generator.",0,null],[13,"MessageTooLong","","Message is too long.",0,null],[13,"InvalidMaxLength","","Invalid maximum length.",0,null],[13,"Md0Violation","","MD0 violation.",0,null],[13,"NoZeroPad","","No zero pad.",0,null],[13,"InvalidEncoding","","Invalid encoding of the message.",0,null],[13,"NullArgument","","Null argument.",0,null],[13,"UnknownParamSet","","Unknown parameter set.",0,null],[13,"InvalidParam","","Invalid parameter.",0,null],[17,"NTRU_MAX_DEGREE","","Max N value for all param sets; +1 for ntru_invert_...()",null,null],[17,"NTRU_MAX_ONES","","max(df1, df2, df3, dg)",null,null],[11,"default","","",1,{"inputs":[],"output":{"name":"ntruintpoly"}}],[11,"clone","","",1,null],[11,"add","","",1,null],[11,"sub","","",1,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"new","","Create a new NtruIntPoly",1,null],[11,"rand","","Create a new random NtruIntPoly",1,{"inputs":[{"name":"u16"},{"name":"u16"},{"name":"ntrurandcontext"}],"output":{"name":"ntruintpoly"}}],[11,"from_arr","","Convert array to NtruIntPoly",1,null],[11,"get_coeffs","","Get the coefficients",1,null],[11,"set_coeffs","","Set the coefficients",1,null],[11,"set_coeff","","Set a coefficient",1,null],[11,"mod_mask","","",1,null],[11,"to_arr_32","","",1,null],[11,"to_arr_64","","",1,null],[11,"to_arr_sse_2048","","",1,null],[11,"mult_tern","","General polynomial by ternary polynomial multiplication",1,null],[11,"mult_tern_32","","General polynomial by ternary polynomial multiplication",1,null],[11,"mult_tern_64","","General polynomial by ternary polynomial multiplication",1,null],[11,"mult_tern_sse","","General polynomial by ternary polynomial multiplication, SSSE3 version",1,null],[11,"add_tern","","",1,null],[11,"mult_prod","","General polynomial by product-form polynomial multiplication",1,null],[11,"mult_priv","","General polynomial by private polynomial multiplication",1,null],[11,"mult_int","","",1,null],[11,"mult_int_16","","",1,null],[11,"mult_int_64","","",1,null],[11,"mult_fac","","Multiply by factor",1,null],[11,"mod_center","","",1,null],[11,"mod3","","",1,null],[11,"equals_mod","","Check if both polynomials are equals given a modulus",1,null],[11,"equals1","","",1,null],[11,"default","","",2,{"inputs":[],"output":{"name":"ntruternpoly"}}],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"eq","","",2,null],[11,"new","","",2,null],[11,"rand","","Random ternary polynomial",2,{"inputs":[{"name":"u16"},{"name":"u16"},{"name":"u16"},{"name":"ntrurandcontext"}],"output":{"name":"option"}}],[11,"get_n","","",2,null],[11,"get_ones","","",2,null],[11,"get_neg_ones","","",2,null],[11,"to_int_poly","","Ternary to general integer polynomial",2,null],[11,"clone","","",3,null],[11,"eq","","",3,null],[11,"ne","","",3,null],[11,"fmt","","",3,null],[11,"default","","",3,{"inputs":[],"output":{"name":"ntruprodpoly"}}],[11,"new","","",3,{"inputs":[{"name":"u16"},{"name":"ntruternpoly"},{"name":"ntruternpoly"},{"name":"ntruternpoly"}],"output":{"name":"ntruprodpoly"}}],[11,"rand","","Random product-form polynomial",3,{"inputs":[{"name":"u16"},{"name":"u16"},{"name":"u16"},{"name":"u16"},{"name":"u16"},{"name":"ntrurandcontext"}],"output":{"name":"option"}}],[11,"to_int_poly","","",3,null],[11,"clone","","",4,null],[11,"default","","",4,{"inputs":[],"output":{"name":"ntruprivpoly"}}],[11,"fmt","","",4,null],[11,"eq","","",4,null],[11,"new_with_prod_poly","","Create a new NtruPrivPoly with a NtruProdPoly",4,{"inputs":[{"name":"ntruprodpoly"}],"output":{"name":"ntruprivpoly"}}],[11,"new_with_tern_poly","","Create a new NtruPrivPoly with a NtruTernPoly",4,{"inputs":[{"name":"ntruternpoly"}],"output":{"name":"ntruprivpoly"}}],[11,"is_product","","If the NtruPrivPoly contains a NtruProdPoly",4,null],[11,"get_poly_prod","","",4,null],[11,"get_poly_tern","","",4,null],[11,"invert","","Inverse modulo q",4,null],[11,"invert_32","","Inverse modulo q",4,null],[11,"invert_64","","Inverse modulo q",4,null],[11,"clone","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"fmt","","",5,null],[11,"default","","",5,{"inputs":[],"output":{"name":"ntruencprivkey"}}],[11,"get_q","","",5,null],[11,"get_t","","",5,null],[11,"get_params","","Get params from the private key",5,null],[11,"import","","Import private key",5,null],[11,"export","","Export private key",5,null],[11,"clone","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"fmt","","",6,null],[11,"default","","",6,{"inputs":[],"output":{"name":"ntruencpubkey"}}],[11,"get_q","","",6,null],[11,"get_h","","",6,null],[11,"import","","Import a public key",6,null],[11,"export","","Export public key",6,null],[11,"clone","","",7,null],[11,"eq","","",7,null],[11,"ne","","",7,null],[11,"fmt","","",7,null],[11,"default","","",7,{"inputs":[],"output":{"name":"ntruenckeypair"}}],[11,"get_params","","Get params from the key pair",7,null],[11,"get_private","","The private key",7,null],[11,"get_public","","The public key",7,null],[11,"clone","","",0,null],[11,"eq","","",0,null],[11,"fmt","","",0,null],[11,"from_uint8_t","","Get the NtruError from the original uint8_t libntru error.",0,{"inputs":[{"name":"uint8_t"}],"output":{"name":"ntruerror"}}],[0,"rand","ntru","Rand module",null,null],[3,"NtruRandContext","ntru::rand","A random context for key generation and encryption",null,null],[3,"NtruRandGen","","",null,null],[5,"init","","Initialize a new rand context",null,{"inputs":[{"name":"ntrurandgen"}],"output":{"name":"result"}}],[5,"init_det","","Generate a new deterministic rand context",null,null],[5,"generate","","Generate random data",null,{"inputs":[{"name":"u16"},{"name":"ntrurandcontext"}],"output":{"name":"result"}}],[17,"NTRU_RNG_DEVURANDOM","","Unix default RNG, /dev/urandom",null,null],[17,"NTRU_RNG_DEVRANDOM","","Unix RNG, /dev/random",null,null],[17,"NTRU_RNG_DEFAULT","","default RNG (/dev/urandom on *nix)",null,null],[17,"NTRU_RNG_IGF2","","Deterministic RNG based on IGF-2",null,null],[11,"default","","",8,{"inputs":[],"output":{"name":"ntrurandcontext"}}],[11,"drop","","",8,null],[11,"get_seed","","",8,null],[11,"set_seed","","",8,null],[11,"get_rng","","",8,null],[11,"init","","Initialize a new random contex",9,null],[11,"generate","","Generate random data",9,null],[0,"encparams","ntru","NTRUEncrypt Encryption parameters",null,null],[3,"NtruEncParams","ntru::encparams","A set of parameters for NtruEncrypt",null,null],[17,"EES401EP1","","An IEEE 1361.1 parameter set that gives 112 bits of security and is optimized for key size.",null,null],[17,"EES449EP1","","An IEEE 1361.1 parameter set that gives 128 bits of security and is optimized for key size.",null,null],[17,"EES677EP1","","An IEEE 1361.1 parameter set that gives 192 bits of security and is optimized for key size.",null,null],[17,"EES1087EP2","","An IEEE 1361.1 parameter set that gives 256 bits of security and is optimized for key size.",null,null],[17,"EES541EP1","","An IEEE 1361.1 parameter set that gives 112 bits of security and is a tradeoff between key size\nand encryption/decryption speed.",null,null],[17,"EES613EP1","","An IEEE 1361.1 parameter set that gives 128 bits of security and is a tradeoff between key\nsize and encryption/decryption speed.",null,null],[17,"EES887EP1","","An IEEE 1361.1 parameter set that gives 192 bits of security and is a tradeoff between key size\nand encryption/decryption speed.",null,null],[17,"EES1171EP1","","An IEEE 1361.1 parameter set that gives 256 bits of security and is a tradeoff between key size\nand encryption/decryption speed.",null,null],[17,"EES659EP1","","An IEEE 1361.1 parameter set that gives 112 bits of security and is optimized for\nencryption/decryption speed.",null,null],[17,"EES761EP1","","An IEEE 1361.1 parameter set that gives 128 bits of security and is optimized for\nencryption/decryption speed.",null,null],[17,"EES1087EP1","","An IEEE 1361.1 parameter set that gives 192 bits of security and is optimized for\nencryption/decryption speed.",null,null],[17,"EES1499EP1","","An IEEE 1361.1 parameter set that gives 256 bits of security and is optimized for\nencryption/decryption speed.",null,null],[17,"EES401EP2","","A product-form parameter set that gives 112 bits of security.",null,null],[17,"EES439EP1","","**DEPRECATED** A product-form parameter set that gives 128 bits of security.",null,null],[17,"EES443EP1","","A product-form parameter set that gives 128 bits of security.",null,null],[17,"EES593EP1","","**DEPRECATED** A product-form parameter set that gives 192 bits of security.",null,null],[17,"EES587EP1","","A product-form parameter set that gives 192 bits of security.",null,null],[17,"EES743EP1","","A product-form parameter set that gives 256 bits of security.",null,null],[17,"NTRU_DEFAULT_PARAMS_112_BITS","","The default parameter set for 112 bits of security.",null,null],[17,"NTRU_DEFAULT_PARAMS_128_BITS","","The default parameter set for 128 bits of security.",null,null],[17,"NTRU_DEFAULT_PARAMS_192_BITS","","The default parameter set for 192 bits of security.",null,null],[17,"NTRU_DEFAULT_PARAMS_256_BITS","","The default parameter set for 256 bits of security.",null,null],[17,"ALL_PARAM_SETS","","All parameter sets, in an array",null,null],[11,"default","","",10,{"inputs":[],"output":{"name":"ntruencparams"}}],[11,"eq","","",10,null],[11,"fmt","","",10,null],[11,"get_name","","Get the name of the parameter set",10,null],[11,"get_n","","Get the number of polynomial coefficients",10,null],[11,"get_q","","Get the modulus",10,null],[11,"get_db","","Get the number of random bits to prepend to the message",10,null],[11,"max_msg_len","","Maximum message length",10,null],[11,"enc_len","","Encryption length",10,null],[11,"public_len","","Public key length",10,null],[11,"private_len","","Private key length",10,null]],"paths":[[4,"NtruError"],[3,"NtruIntPoly"],[3,"NtruTernPoly"],[3,"NtruProdPoly"],[3,"NtruPrivPoly"],[3,"NtruEncPrivKey"],[3,"NtruEncPubKey"],[3,"NtruEncKeyPair"],[3,"NtruRandContext"],[3,"NtruRandGen"],[3,"NtruEncParams"]]}; initSearch(searchIndex);