⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 文档.txt

📁 des加密解密的实现,能够加密任意文件,任意长度
💻 TXT
📖 第 1 页 / 共 5 页
字号:
 输入:     bas_l (Base), exp_l (Exponent), m_l (Modulus)                  
 输出:     p_l (Remainder of bas_l^exp_l mod m_l)                         
 返回值:   E_CLINT_OK : Everything O.K.                                   
            E_CLINT_DBZ: Division by Zero                                  


 功能:  Modular Exponentiation                                         
            with representation of exponent to base 2^k                    
 格式:    int mexpk_l (CLINT bas_l, CLINT exp_l, CLINT p_l, CLINT m_l);  
 输入:     bas_l (Base), exp_l (Exponent), m_l (Modulus)                  
 输出:     p_l (Remainder of bas_l^exp_l mod m_l)                         
 返回值:   E_CLINT_OK : Everything O.K.                                   
            E_CLINT_DBZ: Division by Zero                                  
            E_CLINT_MAL: Error with malloc()                               


 功能:  Modular Exponentiation                                         
            with representation of exponent to base 2^5                    
            for odd moduli, with Montgomery reduction                      
 格式:    int mexp5m_l (CLINT bas_l, CLINT exp_l, CLINT p_l, CLINT m_l); 
 输入:     bas_l (Base), exp_l (Exponent), m_l (Modulus)                  
 输出:     p_l (Remainder of bas_l^exp_l mod m_l)                         
 返回值:   E_CLINT_OK : Everything O.K.                                   
            E_CLINT_DBZ: Division by Zero                                  
            E_CLINT_MOD: Modulus even                                      


 功能:  Modular Exponentiation for odd moduli (Montgomery reduction)   
 格式:    int mexpkm_l (CLINT bas_l, CLINT exp_l, CLINT p_l, CLINT m_l); 
 输入:     bas_l (Base), exp_l (Exponent), m_l (Modulus )                 
 输出:     p_l (Remainder of bas_l ^ exp_l mod m_l)                       
 返回值:   E_CLINT_OK : Everything O.K.                                   
            E_CLINT_DBZ: Division by Zero                                  
            E_CLINT_MAL: Error with malloc()                               
            E_CLINT_MOD: Modulus even                                      


 功能:  Modular exponentiation with exponent 2^k                       
 格式:  int mexp2_l (CLINT a_l, USHORT k, CLINT p_l, CLINT m_l);       
 输入:  a_l (Basis), k (Exponent of exponent 2^k)                      
        m_l (Modulus)                                                  
 输出:  p_l (Remainder of a_l ^(2^k) mod m_l)                          
 返回值: E_CLINT_OK : Everything O.K.                                   
         E_CLINT_DBZ: Division by Zero                                  

 功能:  Calculate number of bits of a CLINT operand                    
            (Integral part of base-2-logarithm + 1)                        
 格式:     ld_l (n_l);                                                    
 输入:     n_l (Argument)                                                 
 输出:    -                                                              
 返回值:   Number of relevant binary digits of n_l                        
                                                                           


 功能:     Testing and setting of a single bit                            
 格式:     int setbit_l (CLINT a_l, unsigned int pos);                    
 输入:      a_l (Argument),                                                            pos (Position of the bit to be set in a_l, leftmost position              is 0)                                                          输出:     a_l, bit in position pos set to 1                               返回值:   1: bit in position pos had value 1 before it was set           
            0: else                                                        


 功能:    XOR (Exclusive Or) of two CLINT operands                       
 格式:    void xor_l (CLINT a_l, CLINT b_l, CLINT c_l);                  
 输入:     a_l, b_l (Operands)                                            
 输出:     c_l (XOR sum of a_l and b_l)                                   
 返回值:   -                                                              


 功能:   OR sum of two CLINT operands                                   
 格式:    void or_l (CLINT a_l, CLINT b_l, CLINT c_l);                   
 输入:     a_l, b_l (Operands)                                            
 输出:     c_l (OR sum of a_l and b_l)                                    
 返回值:   -                                                              
                                                                           


 功能:    AND sum of two CLINT operands                                  
 格式:    void and_l (CLINT a_l, CLINT b_l, CLINT c_l);                  
 输入:     a_l, b_l (Operands)                                            
 输出:     c_l (AND-Sum of a_l and b_l)                                   
 返回值:   -                                                                

 功能:    Greatest Common Divisor of two CLINT operands                  
 格式:    void gcd_l (CLINT aa_l, CLINT bb_l, CLINT cc_l);               
 输入:     aa_l, bb_l (Operands)                                          
 输出:    cc_l (GCD of a_l and b_l)                                      
 返回值:   -   

 
  功能: Extended Euclidean Algorithm                                   
         Greatest Common Divisor d = GCD(a, b) and linear combination              d = au + bv                                                        格式: void xgcd_l (CLINT a_l, CLINT b_l, CLINT d_l, CLINT u_l,       
                             int *sign_u, CLINT v_l, int *sign_v); 
  输入:   a_l, b_l (Operands)                                           
  输出:   d_l (GCD of a_l and b_l)                                       
          u_l, v_l (Factors of the linear combination  d = au + bv      
          with signs in sign_u and sign_v)                               
 返回值:   -       


  功能:    Inverse of a modulo n                                          
  格式:    void inv_l (CLINT a_l, CLINT n_l, CLINT g_l, CLINT i_l);       
  输入:    a_l (Operand), n_l (Modulus)                                     
  输出:    g_l (GCD of a_l and n_l),                                      
           i_l (Inverse of a_l mod n_l)      
           If gcd > 1 the inverse does not exist, i_l is set to zero then 
  返回值:   -      

  功能:	   Integral part of square root of a CLINT operand                
  格式:    void iroot_l (CLINT a_l, CLINT floor_l);                       
  输入:    a_l (Argument)                                                 
  输出:    floor_l (Integral part of square root of a_l)                  
  返回值:  -                                                                                                                                        
  功能:    Sieving by dividing by small primes                            
  格式:    USHORT sieve_l (CLINT a_l, unsigned int no_of_smallprimes);    
  输入:    a_l (Dividend),                                                
           no_of_smallprimes (Number of small primes to divide by)        
  输出:    -                                                              
  返回值:  Prime factor of a_l, if found                                  
           1 if a_l is prime                                              
           0 if no prime factor was found   


  功能:    Probabilistic primality test acc. to Miller-Rabin (MR-Test)    
  格式:    int prime_l (CLINT n_l, unsigned int no_of_smallprimes,        
                                          unsigned int iterations);  
  输入:    n_l (Number to be tested),                                     
           no_of_smallprimes (Number of small primes for the sieve)       
           iterations (Number of rounds for the MR-Test.                  
           If iterations == 0 the optimized number of rounds  
           for an error probability < 2^-80 is used.)         
  输出:    -                                                              
  返回值:  1: n_l probably prime                                          
           0: n_l definitely not prime                                                                                                       


  功能:    Factor 2^t of a CLINT operand n, such that n = 2^t * b, b odd  
  格式     int twofact_l (CLINT a_l, CLINT b_l);                          
  输入:    a_l (Argument)                                                 
  输出:    b_l (Odd factor of a_l)                                        
  返回值:  Logarithm t of the factor 2^t of a_l    


  功能:    Representation of a CLINT operand as character string          
  格式:    char *xclint2str_l (CLINT n_l, USHORT base, int showbase);     
  输入:    n_l (Argument to be represented)                               
           base (Base of representation)                                  
           showbase (==0: no prefix;                                      
                       !=0: prefix 0b, 0 oder 0x for base 2, 8 oder 16)     
  输出:    -                                                              
  返回值:  Pointer to character string                                    
             NULL if base < 2 or base > 16         


  功能:    Conversion of a character string into CLINT-number             
  格式:    int str2clint_l (CLINT n_l, char *str, USHORT b);              
  输入:    str (Pointer to character string),                           
           base (Base to which number in str is represented)              
  输出:    n_l (CLINT value converted from str)                           
  返回值:  E_CLINT_OK : Everything O.K.                                   
           E_CLINT_BOR: Basis invalid                                     
           E_CLINT_OFL: Overflow                                          
           E_CLINT_NPT: str is NULL-Pointer        


  功能:    Representation of CLINT operand as array of bytes (IEEE P1363) 
  格式:    UCHAR *clint2byte_l (CLINT n_l, int *len);                     
  输入:    n_l (Argument to be represented)                               
  输出:    len (Number of bytes in byte array)                            
  返回值:  Pointer to byte array with representation of n_l               
           Significance of digits increasing from right to left           
           NULL, if len is NULL-pointer       


  功能:    Conversion of an array of bytes to CLINT value (IEEE P1363)    
  格式:    int byte2clint_l (CLINT n_l, UCHAR *bytestr, int len);         
  输入:    bytestr (Pointer to array of UCHAR, significance of bytes      
                      increasing from right to left)                        
           len  (Number of bytes in bytestr)                              
  输出:    n_l (CLINT value with converted from bytestr)                  
  返回值:  E_CLINT_OK : Everything O.K.                                   
           E_CLINT_OFL: Overflow                                          
           E_CLINT_NPT: bytestr is NULL-Pointer                                                                                                                              


  功能:    Conversion of an USHORT value to CLINT format                  
  格式:    void u2clint_l (CLINT num_l, USHORT u);                        
  输入:    u (Value to be converted)                                      
  输出:    num_l (CLINT variable with value u)                            
  返回值:   -                     


  功能:    Conversion of an ULONG value to CLINT format                   
  格式:    void ul2clint_l (CLINT num_l, ULONG  ul);                       
  输入:    ul (Value to be converted)                                     
  输出:    num_l (CLINT variable with value ul)                           
  返回值:  -     


  功能:    Conversion of a CLINT operand to a character string          
           with representation to basis 16 (hexadezimal representation)   
  格式:    char *fhexstr_l (CLINT n_l);                                   
  输入:    n_l (CLINT value to be represented)                            
  输出:    Pointer to a character string representing n_l to base 16      
  返回值:   -             



  功能:    Conversion of a CLINT operand to a character string            
             with representation to base 10 (Decimal representation)        
  格式:    char *fdecstr_l (CLINT n_l);                                   
  输入:     n_l (CLINT value to be represented)                            
  输出:    Pointer to a character string representing n_l to base 10      
  返回值:   -           



                                                                                                                                功能:    Conversion of a CLINT operand to a character string            
             with represenation to base 8 (octal representation)            
  格式:    char *foctstr_l (CLINT n_l);                                   
  输入:    n_l (CLINT value to be represented)                            
  输出:    Pointer to a character string representing n_l to base 8       
  返回值:   -      



  功能:     Conversion of a CLINT operand to a character string            
            with represenation to base 2 (binary representation)           
  格式:     char *fbinstr_l (CLINT n_l);                                   
  输入:     n_l (CLINT value to be represented)                            
  输出:     Pointer to a character string representing n_l to base 2       
  返回值:   -        



  功能:      Show version of FLINT-Library                                  
  格式:      unsigned long version_l (void);                                
  输入:      -                                                              
  输出:      -                                                              
  返回值:    Value representing the version of FLINT as defined in flint.h  
             in the most significant word.                                  
             If assembler 功能s are used, the high-order byte of the    
             least significant word shows the value 0x61 (ASCII 'a'), else  
             without assembler support the high-order byte has value 0.     
             If flint.c was compiled in security mode (default), the low-   
             order byte of the least significant word shows the value 0x73  
             (ASCII 's'), else 0.                                                                                                                                                                                               


  功能:      Show version of FLINT-Library as character string              
  格式:      unsigned long verstr_l (void);                                 
  输入:      -                                                              
  输出:      -                                                              
  返回值:    Pointer to character string with version                       
             If assembler 功能s are used, the character 'a' is appended 
             to the version number.                                         
             If flint.c was compiled in security mode, the character 's'    
             is appended to the version string (default).  

  

  功能:     Deletion of a register                                         
  格式:     void purge_l (CLINT reg_l);                                    
  输入:     reg_l (Register)                                               
  输出:     All digits of reg_l are overwritten with 0, thus leaving reg_l 
             with value 0                                                   
  返回值:   -                                                                               

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -