Supercharge Your Innovation With Domain-Expert AI Agents!

Method for realizing data file encryption C language based on an RSA algorithm

An RSA algorithm and data file technology, applied in the fields of digital data protection, electrical digital data processing, calculation, etc., can solve the problems of short DES key digits, inability to resist differential and linear cryptanalysis, low security, etc., and it is not easy to achieve. cracked effect

Inactive Publication Date: 2019-04-09
INSPUR FINANCIAL INFORMATION TECH CO LTD
View PDF2 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The number of DES secret keys is relatively short, 56bit, and the security is relatively low, and it cannot resist differential and linear cryptanalysis

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] The preferred embodiments of the present invention are described in detail below, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, so as to define the protection scope of the present invention more clearly.

[0017] Embodiments of the invention include:

[0018] The realization method of data file encryption C language based on RSA algorithm comprises the following steps:

[0019] 1. Choose a pair of different prime numbers p, q that are large enough;

[0020] Second, calculate n=pq;

[0021] 3. Calculate f(n)=(p-1)(q-1), and keep p and q strictly confidential, so that no one will know;

[0022] 4. Find a number e that is relatively prime to f(n), and 1

[0023] 5. Calculate d so that de≡1mod f(n); this formula can also be expressed as d≡e-1mod f(n) Here, I will explain that ≡ is a symbol representing congruence in number theory; in the formula, the symbol of ≡ The left side must be congr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for realizing data file encryption C language based on an RSA algorithm. The method comprises the following steps: 1, selecting a pair of different prime numbers p andq which are large enough; 2, calculating n = pq; 3, calculating f (n) = (p-1) (q-1), wherein p and q are confidential, so that anyone does not know; 4, finding a number e which is homogeneity with f(n), wherein 1 < e < f < n >; 5, calculating d to enable de to be equal to 1mod f (n); 6, a public key KU = (e, n), and a private key KR = (d, n); 7, when encryption is carried out, firstly, a plaintext is converted into One integer M of 0-n-1; If the plaintext is long, the plaintext can be firstly segmented into appropriate groups and then exchanged; If the ciphertext is set as C, the encryptionprocess is that C is equal to Me (mod n); And 8, the decryption process is that M is equal to Cd (mod n). In this way, the security of the encrypted file can be improved, and the probability of beingcracked is extremely low.

Description

technical field [0001] The invention relates to the field of RSA encryption algorithm, in particular to an implementation method of data file encryption C language based on the RSA algorithm. Background technique [0002] The basic process of data encryption is to process the original plaintext file or data according to a certain algorithm to make it an unreadable piece of code, usually called "ciphertext", so that it can only be read after entering the corresponding key. The original content is displayed, and the purpose of protecting data from being stolen and read by illegal persons is achieved through this method. The inverse of this process is decryption, the process of converting the encoded information into its original data. [0003] At present, the existing encryption algorithms are divided into symmetric algorithms and asymmetric algorithms. The common symmetric algorithms are DES and 3DES algorithms, and the asymmetric algorithm RSA is one of them. The principl...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/60
CPCG06F21/602
Inventor 高强王所麒李志东
Owner INSPUR FINANCIAL INFORMATION TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More