Coding and encryption. Introduction. Coding and encryption of information Coding and encryption of data information






Information security Information security of an information system is the security of information processed by a computer system from internal (intra-system) or external threats, that is, the state of security of the system’s information resources, ensuring the sustainable functioning, integrity and evolution of the system.






Encoding and encryption Encoding Changes the form, but leaves the content the same To read, you need to know the algorithm and encoding table Conversion of information Encryption Can leave the same form, but changes, masks the content To read, it is not enough to know only the algorithm, you need to know the key








Plain text is a message whose text must be made incomprehensible to outsiders. A cipher is a set of reversible transformations of a set of possible open data into a set of possible ciphertexts, carried out according to certain rules using keys. Encryption




Original message: “A” Encrypted: “B” Encryption rule: “f” Encryption scheme: f(A)=B Encryption rule f cannot be arbitrary. It must be such that from the ciphertext B using rule g it is possible to unambiguously reconstruct the open message. Encryption










Classification of cryptoalgorithms Basic classification scheme: Cryptography and Cryptography with a key By the nature of the key: Symmetric and Asymmetric By the nature of the effects on the data: Permutation and Substitution Depending on the size of the information block: Stream and Block




Disadvantages of symmetric encryption The need for a secure communication channel to transfer the key. Example: If we consider a client paying for a product or service using a credit card, it turns out that a trading company must create one key for each of its clients and somehow transfer these keys to them. This is extremely inconvenient.




The keys are designed so that a message encrypted by one half can only be decrypted by the other half (not the one with which it was encrypted). By creating a key pair, the company distributes the public key widely and securely stores the private key. Asymmetric cryptography


1. Public and private keys are a certain sequence. 2. The public key can be published on the server, from where anyone can receive it. If a customer wants to place an order with a company, he will take its public key and use it to encrypt his order message and his credit card information. 3.Once encrypted, this message can only be read by the owner of the private key. None of the participants in the chain through which information is sent is able to do this. 4. Even the sender himself cannot read his own message. Only the recipient will be able to read the message because only he or she has the private key in addition to the public key used. Asymmetric cryptography


Example: If a company needs to send a receipt to a client indicating that the order has been accepted for execution, it will encrypt it with its secret key. The client will be able to read the receipt using the public key of this company that he has. He can be sure that it was this company that sent him the receipt, since no one else has access to the company’s private key. Asymmetric cryptography


The principle of sufficiency of protection There is no point in hiding public key encryption algorithms. Usually they are accessible, and often they are simply published widely. The subtlety is that knowledge of the algorithm does not mean the ability to reconstruct the key in a reasonably acceptable time.


The principle of sufficiency of protection Information protection is generally considered sufficient if the costs of overcoming it exceed the expected value of the information itself. The protection is not absolute and methods for removing it are known, but it is still sufficient to make this event impractical. When other means appear that make it possible to obtain encrypted information in a reasonable time, the principle of operation of the algorithm is changed, and the problem is repeated at a higher level.


Cryptanalysis The search for a secret key is not always carried out using methods of simple enumeration of combinations. For this purpose, there are special methods based on studying the features of the interaction of a public key with certain data structures. The branch of science devoted to this research is called cryptanalysis.




Cryptanalysis In Russia, only those data encryption software tools that have passed state certification by administrative bodies, in particular by the Federal Agency for Government Communications and Information under the President of the Russian Federation (FAPSI), are allowed for use in government and commercial organizations.


The concept of an electronic signature The client can also communicate with the bank, giving it orders to transfer his funds to the accounts of other persons and organizations. However, a problem arises here: how does the bank know that the order came from this person, and not from an attacker posing as him? This problem is solved using an electronic signature.


The concept of an electronic signature When creating an electronic signature, two keys are created: private and public. The public key is transferred to the bank. If you now need to send an order to the bank for an operation with a current account, it is encrypted with the bank’s public key, and your signature under it with your own private key. The bank does the opposite. If the signature is readable, this is 100% confirmation of the sender’s authorship.


Kirchhoff's principle All modern cryptosystems are built on the Kirchhoff principle: the secrecy of encrypted messages is determined by the secrecy of the key. Even if the encryption algorithm is known to the cryptanalyst, he will nevertheless be unable to decrypt the private message if he does not have the appropriate key.


Kirchhoff's Principle All classical ciphers follow this principle and are designed in such a way that there is no way to break them more efficiently than by brute force over the entire key space, that is, trying all possible key values. It is clear that the strength of such ciphers is determined by the size of the key used in them.


Computer virus The main types of means of influencing computer networks and systems are computer viruses. A computer virus is a program that can infect other programs by including in them a possibly modified copy of itself, the latter retaining the ability to reproduce further.




Signs of a computer virus infection: slowdown of the computer; inability to load the operating system; frequent freezes and computer crashes; cessation of operation or incorrect operation of previously successfully functioning programs; increasing the number of files on disk; resizing files; periodic appearance of inappropriate system messages on the monitor screen; reducing the amount of free RAM; a noticeable increase in hard disk access time; changing the date and time of file creation; destruction of the file structure (disappearance of files, distortion of directories, etc.); The disk drive warning light comes on when it is not being accessed.




Internet Attackers place viruses and other malicious programs on web resources and “disguise” them as useful and free software. Additionally, scripts that run automatically when you open a web page can perform malicious actions on your computer, including modifying the system registry, stealing personal data, and installing malicious software. Using network technologies, attackers carry out attacks on remote private computers and company servers. The result of such attacks can be disabling the resource and gaining full access to the resource.


Intranet An intranet is an internal network specifically designed for managing information within a company or, for example, a private home network. An intranet is a single space for storing, exchanging and accessing information for all computers on the network. Therefore, if any computer on the network is infected, the remaining computers are at great risk of infection. To avoid such situations, it is necessary to protect not only the network perimeter, but also each individual computer.


Email The user of an infected computer, without knowing it, sends infected emails to recipients, who in turn send new infected emails, etc. There are often cases when an infected document file, due to an oversight, ends up on the commercial information mailing lists of a large company. In this case, not five, but hundreds or even thousands of subscribers of such mailings suffer, who then send infected files to tens of thousands of their subscribers. In addition to the threat of malware, there is the problem of external advertising junk mail (spam). While not a source of direct threat, unsolicited mail increases the load on mail servers, creates additional traffic, clogs the user's mailbox, leads to lost work time, and thereby causes significant financial damage.


Removable storage media Removable storage media - floppy disks, CD/DVD drives, flash cards - are widely used for storing and transmitting information. When you run a file containing malicious code from removable media, you can damage data stored on your computer and spread the virus to other computer drives or computer networks.




Network viruses spread across various computer networks. File viruses are embedded primarily in executable modules, COM and EXE files. They can be embedded in others, but once written in such files, they never receive control and lose the ability to reproduce. Boot viruses are embedded in the boot sector of the disk (Boot sector) or in the sector containing the system disk boot program (Master Boot Record). File-boot viruses infect both files and boot sectors of disks. Habitat


A resident virus leaves its resident part in the RAM, which then intercepts the operating system's access to infection objects (files, disk boot sectors, etc.) and injects itself into them. They are located in memory and are active until the computer is turned off or rebooted. Non-resident viruses do not infect computer memory and are active for a limited time. Method of infection


Non-hazardous (harmless), which do not interfere with the operation of the computer, but reduce the amount of free RAM and disk memory, manifest themselves in some graphic or sound effects. Dangerous, which can lead to various problems in the operation of the computer. Very dangerous, the impact of which can lead to the loss of programs, destruction of data, and erasure of information in system areas of the disk. Impact level



“Polymorphic” (self-encrypting or ghost viruses, polymorphic) - quite difficult to detect, without signatures, i.e. not containing a single permanent piece of code. In most cases, two samples of the same polymorphic virus will not have a single match. This is achieved by encrypting the main body of the virus and modifying the decryption program. "Macro viruses" - use the capabilities of macro languages ​​built into data processing systems (text editors, spreadsheets, etc.). Currently, the most common macro viruses are those that infect text documents in the Microsoft Word editor. Features of the algorithm


"Stealth viruses" (invisible viruses, stealth) are very sophisticated programs that intercept calls to infected files or disk sectors and “substitute” uninfected sections of information in their place. In addition, when accessing files, such viruses use rather original algorithms that allow them to “deceive” resident anti-virus monitors. Trojan programs are not capable of self-propagation, are very dangerous (they destroy the boot sector and file system of disks), and are distributed under the guise of useful software. Features of the algorithm


Software that allows you to collect information about an individual user or organization without their knowledge. You may not even realize that you have spyware on your computer. Typically, the purpose of spyware is to: monitor user actions on the computer; collecting information about the contents of the HDD; most often, some directories and the system registry are scanned in order to compile a list of software installed on the PC; collecting information about the quality of communication, connection method, modem speed, etc. Spyware


Program code included in software without the user's knowledge for the purpose of displaying advertisements. Advertising programs are built into software that is distributed free of charge. Advertising is located in the working interface. Often, these programs also collect and forward personal information about the user to their developer, change various browser parameters (start and search pages, security levels, etc.), and also create traffic uncontrolled by the user. All this can lead to both a violation of security policy and direct financial losses. Adware


Software that does not cause any direct harm to the computer, but displays messages indicating that such harm has already been caused or will be caused under certain conditions. Such programs often warn the user about a non-existent danger, for example, they display messages about formatting the disk (although no formatting actually occurs), detect viruses in uninfected files, etc. Jokes


Utilities used to hide malicious activity. They disguise malware to avoid detection by antivirus programs. Masking programs modify the operating system on a computer and replace its basic functions in order to hide their own presence and the actions that the attacker takes on the infected computer. Cloaking programs (Rootkit)


Antivirus programs Detector programs can detect files infected with one of several known viruses. Doctor programs, or phages, “treat” infected programs or disks by “biting out” the body of the virus from the infected programs, i.e. restoring the program to the state it was in before the virus was infected.


Anti-virus programs Auditor programs first remember information about the state of programs and system disk areas, and then compare their state with the original one. If any discrepancies are detected, the user is notified. Doctor-inspectors are hybrids of auditors and doctors, i.e. programs that not only detect changes in files and system areas of disks, but can also automatically return them to their original state in the event of changes.




Anti-virus programs Vaccine programs, or immunizers, modify programs and disks in such a way that this does not affect the operation of the programs, but the virus against which the vaccination is performed considers these programs or disks to be already infected. These programs are extremely ineffective.


Prevention of computer virus infection Copying information and access control: It is necessary to have archival or reference copies of the software packages and data used and periodically archive the files that you created or changed. Before archiving files, it is advisable to check them for viruses using a detector program (for example, Dr.Web). It is important that information is not copied too rarely - then the loss of information if it is accidentally destroyed will not be so great. It is also advisable to copy the sector with the hard disk partition table, the unload sectors of all logical drives and the contents of CMOS (computer non-volatile memory) to floppy disks. You should set write protection on floppy disks containing files that you do not want to modify. It is advisable to create a write-protected logical disk on a hard drive and place programs and data on it that do not need to be changed. You should not rewrite software from other computers (especially those that may be accessed by various irresponsible persons), because it may be infected with a virus. However, it should be noted that “branded” floppy disks with programs distributed by manufacturers, as a rule, do not contain viruses.


Preventing computer virus infection Checking data coming from outside: All floppy disks brought from outside should be checked for the presence of a virus using detector programs before use. This is useful to do even in cases where you only need to use data files on these floppy disks - the sooner the virus is detected, the better. If the brought programs are recorded on floppy disks in archived form, you should extract the files from the archive and check them immediately after that. If programs from archives can only be extracted by installing a software package, then you need to install this package and immediately after that check the files written to the disk, as described above. It is advisable to perform the installation with the resident virus protection filter program enabled.


Actions when infected with a computer virus 1. There is no need to rush and make rash decisions - ill-considered actions can lead not only to the loss of some files that could be restored, but also to re-infection of the computer. 2. Immediately turn off the computer so that the virus does not continue its destructive actions. 3. All actions to detect the type of infection and treat the computer should be performed only when the computer is booted from a write-protected “reference” floppy disk with the operating system. In this case, you should only use programs (executable files) stored on write-protected floppy disks. Failure to comply with this rule can lead to very serious consequences, since when you boot the computer or run a program from an infected disk, a virus may be activated in the computer, and if the virus is running, treating the computer will be pointless, because it will be accompanied by further infection of disks and programs. 4.If a resident filter program is used to protect against a virus, then the presence of a virus in any program can be detected at a very early stage, when the virus has not yet had time to infect other programs and corrupt any files. In this case, you should restart the computer from the floppy disk and delete the infected program, and then rewrite this program from the reference floppy disk or restore it from the archive. In order to find out whether the virus has corrupted any other files, you should run an audit program to check for changes in files, preferably with a wide list of files to scan. To avoid continuing to infect your computer during the scanning process, you should run the executable file of the audit program located on the floppy disk.


History of computer virology 1945. Birth of the term. US Navy Vice Admiral Grace Murray Hopper, who headed the information department of the naval headquarters, was faced with the fact that electronic counting machines (prototypes of modern computers) began to malfunction. The cause was a moth that flew inside one of the relays. The admiral called this problem a "bug", using a term used by US and British physicists since the late 19th century (it meant any kind of malfunction in electrical devices). The admiral was also the first to use the term “getting rid of a bug” - debugging, which is now used to describe actions aimed at troubleshooting computer problems.


History of computer virology 1949. An American scientist of Hungarian origin, John von Neumann, developed a mathematical theory of creating self-replicating programs. This was the first theory about the creation of computer viruses, which aroused very limited interest among the scientific community.


History of computer virology Late 1960s. The appearance of the first viruses. In some cases, these were bugs in programs that caused programs to copy themselves, clogging up computers' hard drives and reducing their productivity, but in most cases it is believed that viruses were deliberately designed to destroy. Probably the first victim of a real virus, written by a programmer for entertainment, was the Univax computer. The virus was called Pervading Animal and infected only one computer - on which it was created.


History of computer virology 1975. The first ever network virus, The Creeper, is spread through Telenet (a commercial computer network). To counter the virus, for the first time in history, a special anti-virus program, The Reeper, was written. Engineers from the Xerox research center created the first computer worm. The Elk Cloner virus affects Apple computers. The virus spread through “pirated” computer games.


History of computer virology 1983. Scientist Fred Cohen from the University of North Carolina coins the term "computer virus" year. For the first time a virus was created for the IBM PC - The Brain. Two brother programmers from Pakistan wrote a program that was supposed to “punish” local “pirates” who steal software from their company. The program contained the names, addresses and telephone numbers of the brothers. However, unexpectedly for everyone, The Brain went beyond the borders of Pakistan and infected hundreds of computers around the world. The success of the virus was ensured by the fact that the computer community was absolutely unprepared for such a development of events.


History of computer virology 1988. A 23-year-old American programmer created a worm that infected the ARPANET. For the first time, the infection was widespread - 6 thousand computers were affected. For the first time, the court convicted the author of a computer virus: he was sentenced to a $10 thousand fine and three years of probation. After this incident, serious non-computer publications began to write about the problem of computer viruses.


History of computer virology 1989. ARPANET was officially renamed the Internet. The first antivirus software was created for the IBM PC. That same year, the first Trojan horse, AIDS, appeared. The virus made all information on the hard drive inaccessible and displayed only one message on the screen: “Send a check for $189 to such and such an address.” The author of the program was arrested while cashing out the money and convicted of extortion.


History of computer virology 1993. The SatanBug virus infects hundreds of computers in the US capital, Washington. Even the White House computers are suffering. The FBI arrested the author - he turned out to be a 12-year-old teenager. For the first time, a computer virus caused an epidemic on a global scale. The Melissa virus infected tens of thousands of computers and caused $80 million in damage. After this incident, the world began to experience a collapse in demand for antivirus programs. Melissa's record was broken by the I Love You! virus, which infected millions of computers within a few hours.


History of computer virology 2003. The Slammer worm broke records for the speed of spread, infecting 75 thousand computers within 10 minutes. The virus affected the computers of the US State Department, where it damaged the database. US consulates around the world were forced to interrupt the visa issuance process for 9 hours.


History of computer virology In 2004, 46 major virus epidemics were recorded. This number exceeds the results of last year (35 epidemics), many of which were caused by the simultaneous (within one day) appearance of several variants of the same virus. Among the varieties of malware, the palm has long been firmly held by worms - both network and email, which is not surprising, since e-mail is the most popular medium for the spread of computer infections and the speed of spread in such an environment is the highest.


History of computer virology The year 2005 was marked by the appearance of several email worms (Mytob.LX, Sober-Z) and Trojan programs (Ryknos.G, Downloader.GPH). The Mytob.LX worm is sent in emails telling users that in order to renew their use of a certain security company, they must visit a web page (ostensibly to verify their email address). However, if a user visits this site, the Confirmation_Sheet.pif file, which is a copy of the Mytob.LX worm, is downloaded to his computer. After installation, the worm searches the computer for email addresses (in temporary Internet files, the address book, and files with certain extensions) containing certain text strings. It then sends itself to the addresses it finds.


Virus trends for 2010 Antivirus by itself will not be enough Social engineering is the main vector for the development of malicious attacks Scams related to the sale of antiviruses The target of attacks will be third-party applications on social networks More viruses for Windows 7 Hiding infected sites behind proxy servers Shortening links Number of viruses for Mac and smartphones will increase More spam Spammer activity will fluctuate Increase in specialized malware CAPTCHA technology will improve Spam on messaging networks will increase

One of the most important tasks (of the entire society) is the task of encoding messages and encrypting information. The science of cryptology (cryptos - secret, logos - science) deals with issues of protecting and hiding information. Cryptology has two main directions - cryptography and cryptanalysis. The goals of these directions are opposite. Cryptography deals with the construction and study of mathematical methods for transforming information, and cryptanalysis deals with the study of the possibility of decrypting information without a key.


The rule for matching a set of characters of one set X with the characters of another set Y. If each character X during encoding corresponds to a separate character Y, then this is encoding. If for each symbol from Y its prototype in X is uniquely found according to some rule, then this rule is called decoding. Coding is the process of converting letters (words) of the X alphabet into letters (words) of the Y alphabet.


The encryption rules must be chosen so that the encrypted message can be decrypted. Rules of the same type (for example, all ciphers of the Caesar cipher type, according to which each character of the alphabet is encoded by a symbol spaced k positions from it) are combined into classes, and inside the class a certain parameter is defined (numeric, symbolic table, etc.), allowing iterate ( vary) all the rules. This parameter is called an encryption key. It is usually secret and is communicated only to the person who must read the encrypted message (the owner of the key).


A permutation cipher only changes the order of the characters in the original message. These are ciphers whose transformations lead to changes only in the sequence of symbols of the open source message. A substitution cipher replaces each character of the encoded message with another character(s) without changing their order. These are ciphers whose transformations lead to the replacement of each character of the open message with other characters, and the order of the characters in the private message coincides with the order of the corresponding characters in the open message.


Reliability refers to the ability to resist breaking a cipher. When decrypting a message, everything except the key can be known, that is, the strength of the cipher is determined by the secrecy of the key, as well as the number of its keys. Even open cryptography is used, which uses different keys for encryption, and the key itself can be publicly available, published. The number of keys can reach hundreds of trillions.


The X family of plaintext transformations. Members of this family are indexed, denoted by the symbol k; parameter k is the key. The key set K is the set of possible values ​​for key k. Usually the key is a sequential series of letters of the alphabet.


In symmetric cryptosystems, the same key is used for both encryption and decryption. Public key systems use two keys, a public and a private, that are mathematically (algorithmically) related to each other. Information is encrypted using a public key, which is available to everyone, and decrypted only using a private key, which is known only to the recipient of the message.


An electronic (digital) signature (EDS) is a cryptographic transformation attached to the text, which allows, when another user receives the text, to verify the authorship and authenticity of the message. There are two main requirements for digital signatures: ease of verification of signature authenticity; high difficulty of signature forgery.




During the encryption process, in order for the key to be fully used, it is necessary to repeatedly perform the encoding procedure with different elements. Basic cycles consist of repeated use of different key elements and differ from each other only in the number of repetitions and the order in which the key elements are used.


All modern cryptosystems are built on the Kirchhoff principle: the secrecy of encrypted messages is determined by the secrecy of the key. This means that even if the encryption algorithm is known to the cryptanalyst, he will nevertheless be unable to decrypt the private message if he does not have the appropriate key. All classical ciphers follow this principle and are designed in such a way that there is no way to break them more efficiently than by brute force over the entire key space, that is, trying all possible key values. It is clear that the strength of such ciphers is determined by the size of the key used in them.


Information security of an information system is the security of information processed by a computer system from internal (intra-system) or external threats, that is, the state of security of the system’s information resources, ensuring the sustainable functioning, integrity and evolution of the system. Protected information (system information resources) includes electronic documents and specifications, software, structures and databases, etc.


The security assessment of computer systems is based on various systems protection classes: minimum security class of systems (class D); class of systems with protection at the discretion of the user (class C); class of systems with mandatory protection (class B); class of systems with guaranteed protection (class A).


The main types of means of influencing computer networks and systems are computer viruses, logic bombs and mines (bookmarks, bugs), and penetration into information exchange. Example. A virus program on the Internet that repeatedly sent out its code in 2000 could, when opening an attachment to the text of a letter with an intriguing title (I Love You), send its code to all addresses recorded in the address book of the given recipient of the virus, which led to fan proliferation virus over the Internet, because the address book of each user can contain tens and hundreds of addresses


A computer virus is a special program that was compiled by someone with malicious intent or to demonstrate ambitious, in a bad sense, interests, capable of reproducing its code and moving from program to program (infection). The virus is associated with an infection that penetrates blood cells and travels throughout the human body. By intercepting control (interrupts), the virus connects to a running program or to other programs and then instructs the computer to write the infected version of the program, and then returns control to the program as if nothing had happened. Later or immediately, this virus can start working (by seizing control from the program).


As new computer viruses appear, developers of anti-virus programs write a vaccine against it - a so-called anti-virus program, which, by analyzing files, can recognize the hidden virus code in them and either remove this code (cure) or delete the infected file. Antivirus program databases are updated frequently.


One of the most popular anti-virus programs, AIDSTEST, is updated by the author (D. Lozinsky) sometimes twice a week. The well-known anti-virus program AVP from Kaspersky Lab contains in its database data on several tens of thousands of viruses cured by the program


Boot - infecting the starting sectors of disks, where the most important information about the structure and files of the disk is located (service areas of the disk, the so-called boot sectors); hardware-harmful - leading to malfunction, or even complete destruction of the equipment, for example, to a resonant effect on the hard drive, to the “breakdown” of a point on the display screen; software – infecting executable files (for example, exe files with directly launched programs); polymorphic - which undergo changes (mutations) from infection to infection, from carrier to carrier; Stele c-viruses – camouflage, invisible (not defining themselves either by size or by direct action); macro viruses – infecting documents and text editor templates used in their creation; multipurpose viruses.


Viruses in computer networks are especially dangerous, as they can paralyze the entire network. from external storage media (from copied files, from floppy disks); via email (from files attached to the letter); via the Internet (from downloaded files). There are various methods and software packages to combat viruses (antivirus packages).


If the system uses different platforms and operating environments, then the antivirus package must support all of these platforms; the anti-virus package should be simple and understandable, user-friendly, allowing you to select options unambiguously and definitely at every step of the work, and have a developed system of clear and informative tips; the anti-virus package must detect - say, using various heuristic procedures - new unknown viruses and have a database of viruses that is replenished and updated regularly; the anti-virus package must be licensed from a reliable, well-known supplier and manufacturer who regularly updates the database, and the supplier itself must have its own anti-virus center - a server, from where you can get the necessary urgent help and information.

To the question of what is the difference between encoding and encryption asked by the author Eurovision the best answer is Encryption is a way of changing a message or other document so that its contents are distorted (hidden). (Encoding is the transformation of ordinary, understandable text into code. It is assumed that there is a one-to-one correspondence between the symbols of the text (data, numbers, words) and the symbolic code - this is the fundamental difference between encoding and encryption.

Answer from Slip through[newbie]
Encryption is a way of changing a message or other document.
Coding is the transformation of ordinary, understandable text into code.


Answer from Alexey Glazov[guru]
Coding is the transformation of information in order to ensure the convenience of its storage or transmission. There is NO secrecy. This is simply a translation to another format, which for some reason is more convenient
Encryption is the transformation of information in order to make it difficult or impossible for unauthorized persons to UNDERSTAND or change this information in the event of interception. There IS secrecy here.


Answer from Sergey Andrianov[guru]
Both terms are polysemantic; I will focus on one meaning for each term, where an analogy can be drawn.
Coding is the transformation of the REPRESENTATION of the same information in a different form. For example, a digital (discrete) signal through a continuously changing voltage, current or EM field strength. Representation of text as a sequence of bits, etc.
Encryption is the transformation of information in order to protect it from unauthorized access, usually without changing the method of presentation. That is, from one file on the disk another file is obtained.


Answer from dry up[guru]
Encryption is more difficult


Answer from Alexey Baraev[guru]
Coding is an ambiguous term. Quite often “coding” is the name given to writing program code; I won’t mention psychotherapeutic coding :))
So encoding vs encryption.
When encoding, a certain alphabet A is put in DIRECT correspondence with a certain alphabet B.
Words formed from the A alphabet can be unambiguously translated into words written in the B alphabet using a conversion table.
For example, the ASCII encoding, which is still widely used today.
The symbol A corresponds to the number 65, the symbol B corresponds to the number 66, etc.
The “cipher” described by Edgar Poe in the story “The Gold Bug” is not actually a cipher. This is a coding example.
Encryption is the process of applying some cryptographic transformation of plaintext based on an algorithm and a key, which results in ciphertext.
Speaking at a very primitive level, encoding does not require a key, and the algorithm is usually simple - unambiguous replacement of an element of alphabet A with alphabet B. And vice versa. Encoding is only symmetrical. Depending on the algorithm, encryption can be either symmetric or asymmetric.

In modern society, the success of any type of activity strongly depends on the possession of certain information (information) and on the lack of it (it) among competitors. The stronger this effect is, the greater the potential losses from abuses in the information sphere and the greater the need for information protection. In a word, the emergence of the information processing industry led to the emergence of an industry of means of protecting it and to the actualization of the very problem of information protection, the problem of information security.

One of the most important tasks (of the entire society) is the task of encoding messages and encrypting information.

Science deals with issues of information protection and concealment cryptology(cryptos - secret, logos - science). Cryptology has two main directions - cryptography And cryptanalysis. The goals of these directions are opposite. Cryptography deals with the construction and study of mathematical methods for transforming information, and cryptanalysis deals with the study of the possibility of decrypting information without a key. The term "cryptography" comes from two Greek words: kryptos and grofein - to write. Thus, it is secret writing, a system of transcoding a message in order to make it incomprehensible to the uninitiated, and a discipline that studies the general properties and principles of secret writing systems.

Let's introduce some basic concepts of coding and encryption.

A code is a rule for matching a set of characters of one set X to the characters of another set Y. If each character X during encoding corresponds to a separate character Y, then this is encoding. If for each symbol from Y its prototype in X is uniquely found according to some rule, then this rule is called decoding.

Coding is the process of converting letters (words) of the X alphabet into letters (words) of the Y alphabet.

When representing messages in a computer, all characters are encoded by bytes.

Example. If each color is encoded with two bits, then no more than 22 = 4 colors can be encoded, with three - 23 = 8 colors, with eight bits (byte) - 256 colors. There are enough bytes to encode all the characters on a computer keyboard.

The message that we want to send to the recipient will be called an open message. It is, naturally, defined over some alphabet.

The encrypted message can be constructed over another alphabet. Let's call it a closed message. The process of converting a clear message into a private message is encryption.

If A is an open message, B is a closed message (cipher), f is an encryption rule, then f(A) = B.

The encryption rules must be chosen so that the encrypted message can be decrypted. Rules of the same type (for example, all ciphers of the Caesar cipher type, according to which each character of the alphabet is encoded by a symbol spaced k positions from it) are combined into classes, and inside the class a certain parameter is defined (numeric, symbolic table, etc.) that allows iterating ( vary) all the rules. This parameter is called an encryption key. It is usually secret and is communicated only to the person who must read the encrypted message (the owner of the key).

With encoding there is no such secret key, since encoding aims only at a more condensed, compact representation of the message.

If k is a key, then we can write f(k(A)) = B. For each key k, the transformation f(k) must be invertible, that is, f(k(B)) = A. The set of transformation f(k) and the correspondence of the set k is called a cipher.

There are two large groups of ciphers: permutation ciphers and substitution ciphers.

A permutation cipher only changes the order of the characters in the original message. These are ciphers whose transformations lead to changes only in the sequence of symbols of the open source message.

A substitution cipher replaces each character of the encoded message with another character(s) without changing their order. These are ciphers whose transformations lead to the replacement of each character of the open message with other characters, and the order of the characters in the private message coincides with the order of the corresponding characters in the open message.

Reliability refers to the ability to resist breaking a cipher. When decrypting a message, everything except the key can be known, that is, the strength of the cipher is determined by the secrecy of the key, as well as the number of its keys. Even open cryptography is used, which uses different keys for encryption, and the key itself can be publicly available, published. The number of keys can reach hundreds of trillions.

Example. One of the best examples of an encryption algorithm is the DES (Data Encrypted Standard) algorithm adopted in 1977 by the US National Bureau of Standards. Research of the algorithm by specialists has shown that there are no vulnerabilities yet on the basis of which it would be possible to propose a cryptanalysis method that is significantly better than exhaustive search of keys. In July 1991, a similar domestic cryptographic algorithm (standard GOST 28147-89) was introduced, which is superior to DES in reliability.

Cryptographic system- family X of transformations of open texts. Members of this family are indexed, denoted by the symbol k; parameter k is the key. The key set K is the set of possible values ​​for key k. Usually the key is a sequential series of letters of the alphabet.

The plaintext is usually of arbitrary length. If the text is large and cannot be processed by the encoder (computer) as a whole, then it is divided into blocks of a fixed length, and each block is encrypted separately, regardless of its position in the input sequence. Such cryptosystems are called block cipher systems.

Cryptosystems are divided into symmetric, public key, and electronic signature systems.

IN symmetric cryptosystems The same key is used for both encryption and decryption.

In public key systems, two keys are used - public and private, which are mathematically (algorithmically) related to each other. Information is encrypted using a public key, which is available to everyone, and is decrypted only using a private key, which is known only to the recipient of the message.

Electronic (digital) signature (EDS) is called a cryptographic transformation attached to the text, which allows, when the text is received by another user, to verify the authorship and authenticity of the message. There are two main requirements for digital signatures: ease of verification of signature authenticity; high difficulty of signature forgery.

Cryptography studies, in addition to cryptosystems (symmetric, public key, electronic signature), also key management systems.

Key management systems are information systems whose purpose is to compile and distribute keys among users of the information system.

Developing key and password information is a typical task for a system security administrator. The key can be generated as an array of the required size of statistically independent and equally likely distributed elements over the binary set (0, 1).

Example. For such purposes, you can use a program that generates a key based on the “electronic roulette” principle. When the number of users, that is, the amount of necessary key information, is very large, hardware random (pseudo-random) number sensors are more often used. Passwords also need to be changed. For example, the well-known Morris virus attempts to log into a system by sequentially trying passwords from its internal heuristically compiled list of several hundred procedures that simulate the “composition” of passwords by a person.

Passwords should be generated and distributed to users by the system security administrator, based on the basic principle of ensuring an equal probability of each alphabetic character appearing in the password.

During the encryption process, in order for the key to be fully used, it is necessary to repeatedly perform the encoding procedure with different elements. Basic cycles consist of repeated use of different key elements and differ from each other only in the number of repetitions and the order in which the key elements are used.

Example. In banking systems, the initial exchange of keys between the client and the bank is carried out on magnetic media without transmitting keys through open computer networks. The client's secret key is stored on the bank's certification server and is not accessible to anyone. To carry out all operations with digital signature, software provided by the bank is installed on the client’s computer, and all necessary data for the client - public, private key, login, password, etc. - are usually stored on a separate floppy disk or on a special device connected to the computer client.

All modern cryptosystems are built on Kirchhoff's principle: The secrecy of encrypted messages is determined by the secrecy of the key.

This means that even if the encryption algorithm is known to the cryptanalyst, he will nevertheless be unable to decrypt the private message if he does not have the appropriate key. All classical ciphers follow this principle and are designed in such a way that there is no way to break them more efficiently than by brute force over the entire key space, that is, trying all possible key values. It is clear that the strength of such ciphers is determined by the size of the key used in them.

Example. Russian ciphers often use a 256-bit key, and the volume of the key space is 2256. On no real existing or possible in the near future computer, it is possible to select a key (by brute force) in a time less than many hundreds of years. The Russian crypto-algorithm was designed with a large margin of reliability and durability.

Information security of an information system is the security of information processed by a computer system from internal (intra-system) or external threats, that is, the state of security of the system’s information resources, ensuring the sustainable functioning, integrity and evolution of the system. Protected information (system information resources) includes electronic documents and specifications, software, structures and databases, etc.

The security assessment of computer systems is based on various systems protection classes:

  • · class of minimum security systems (class D);
  • · class of systems with protection at the discretion of the user (class C);
  • · class of systems with mandatory protection (class B);
  • · class of systems with guaranteed protection (class A).

These classes also have subclasses, but we will not detail them here.

The main types of means of influencing computer networks and systems are computer viruses, logic bombs and mines (bookmarks, bugs), and penetration into information exchange.

Example. A virus program on the Internet that repeatedly sent out its code in 2000 could, when opening an attachment to the text of a letter with an intriguing title (ILoveYou - I Love You), send its code to all addresses recorded in the address book of the given recipient of the virus, which led to the virus multiplying all over the Internet, because the address book of each user can contain tens and hundreds of addresses.

A computer virus is a special program that was compiled by someone with malicious intent or to demonstrate ambitious, in a bad sense, interests, capable of reproducing its code and moving from program to program (infection). The virus is like an infection that penetrates the blood cells and travels throughout the human body. By intercepting control (interrupts), the virus connects to a running program or to other programs and then instructs the computer to write the infected version of the program, and then returns control to the program as if nothing had happened. Later or immediately, this virus can start working (by seizing control from the program).

As new computer viruses appear, developers of anti-virus programs write a vaccine against it - a so-called anti-virus program, which, by analyzing files, can recognize the hidden virus code in them and either remove this code (cure) or delete the infected file. Antivirus program databases are updated frequently.

Example. One of the most popular anti-virus programs, AIDSTEST, is updated by the author (D. Lozinsky) sometimes twice a week. The well-known anti-virus program AVP from Kaspersky Lab contains in its database data on several tens of thousands of viruses that the program can cure.

Viruses come in the following main types:

  • · boot- infecting starting sectors of disks, where the most important information about the structure and files of the disk is located (service areas of the disk, the so-called boot sectors);
  • · hardware-harmful- leading to malfunction, or even complete destruction of the equipment, for example, to a resonant effect on the hard drive, to the “breakdown” of a point on the display screen;
  • · software- infecting executable files (for example, exe files with directly launched programs);
  • · polymorphic- which undergo changes (mutations) from infection to infection, from carrier to carrier;
  • · stealth viruses- camouflaged, invisible (not defining themselves either by size or by direct action);
  • · macroviruses- infecting documents and text editor templates used in their creation;
  • · multi-target viruses.

Viruses in computer networks are especially dangerous, as they can paralyze the entire network.

Viruses can penetrate the network, for example:

  • · from external storage media (from copied files, from floppy disks);
  • · via email (from files attached to the letter);
  • · via the Internet (from downloaded files).

There are various methods and software packages to combat viruses (antivirus packages).

When choosing antiviral agents, you must adhere to the following simple principles (similar to anti-influenza prophylaxis):

  • · if the system uses different platforms and operating environments, then the anti-virus package must support all these platforms;
  • · the anti-virus package should be simple and understandable, user-friendly, allowing you to select options unambiguously and definitely at every step of the work, and have a developed system of clear and informative tips;
  • · the anti-virus package must detect - say, using various heuristic procedures - new unknown viruses and have a database of viruses that is replenished and updated regularly;
  • · the anti-virus package must be licensed from a reliable, well-known supplier and manufacturer who regularly updates the database, and the supplier itself must have its own anti-virus center - server, from where you can get the necessary urgent help and information.

Example. Research shows that if half of the world's computers have constant, effective anti-virus protection, then computer viruses will be unable to reproduce.

Description: The science of cryptology deals with issues of protecting and hiding information (cryptos - secret, logos - science). Cryptology has two main areas - cryptography and cryptanalysis. The goals of these directions are opposite. Cryptography deals with the construction and study of mathematical methods for transforming information, and cryptanalysis deals with the study of the possibility of decrypting information without a key. The term "cryptography" comes from two Greek words: kryptos and grofein - to write. Thus, it is secret writing, a system of transcoding a message in order to make it incomprehensible to the uninitiated, and a discipline that studies the general properties and principles of secret writing systems. The abstract contains 1 file:

Abstract on computer science (original).docx

  1. Introduction………………………………………………………… …………....…3
  2. Basic concepts of coding and encryption……………….…………......4
  3. Methods of encoding information..…………………………………….…5
    1. Binary coding……………………………….………….....6
    2. Coding of symbolic information………………….………………...7
    3. Coding of numerical information………………………………….…...8
    4. Coding of text information……………………………………...9
    5. Universal coding of text information…………………...14
    6. Coding of graphic information………………………………….15
    7. Coding of audio information………………………….………..…17
  4. Encryption……………………………………………………… ….……….….19
    1. Types of ciphers……………………………………………………………………………… 20
    2. Reliability in encryption……………………………………………..… 21
    3. Cryptographic systems……………………………………………………...…22
  5. Conclusion…………………………………………………………….…....24
  6. References…………………………………………………… …...….25

Introduction

In modern society, the success of any type of activity strongly depends on the possession of certain information (information) and on the lack of it (it) among competitors. The stronger this effect is, the greater the potential losses from abuses in the information sphere and the greater the need for information protection. In a word, the emergence of the information processing industry led to the emergence of an industry of means of protecting it and to the actualization of the very problem of information protection, the problem of information security.

One of the most important tasks (of the entire society) is the task of encoding messages and encrypting information.

The science of cryptology (cryptos - secret, logos - science) deals with issues of protecting and hiding information. Cryptology has two main areas - cryptography and cryptanalysis. The goals of these directions are opposite. Cryptography deals with the construction and study of mathematical methods for transforming information, and cryptanalysis deals with the study of the possibility of decrypting information without a key. The term "cryptography" comes from two Greek words: kryptos and grofein - to write. Thus, it is secret writing, a system of transcoding a message in order to make it incomprehensible to the uninitiated, and a discipline that studies the general properties and principles of secret writing systems.

Basic Coding and Encryption Concepts

Code– a rule for matching a set of characters of one set X with the characters of another set Y. If each character X during encoding corresponds to a separate character Y, then this is encoding. If for each symbol from Y its prototype in X is uniquely found according to some rule, then this rule is called decoding.

Sign is an element of a finite set of elements distinct from each other.

Coding– the process of converting letters (words) of the X alphabet into letters (words) of the Y alphabet.

The message that we want to send to the recipient will be called an open message. It is, naturally, defined over some alphabet. The encrypted message can be constructed over another alphabet. Let's call it a closed message.

Encryption- the process of converting an open message into a closed message.

Cipher- any text conversion system (code) to ensure the secrecy of transmitted information.

Methods of encoding information

The same information can be presented (encoded) in several forms. With the advent of computers, the need arose to encode all types of information that both an individual and humanity as a whole deal with. But humanity began to solve the problem of encoding information long before the advent of computers. The grandiose achievements of mankind - writing and arithmetic - are nothing more than a system for encoding speech and numerical information. Information never appears in its pure form, it is always presented somehow, encoded somehow.

Binary coding

To automate work with data belonging to different types, it is very important to unify their form of presentation - for this, a coding technique is usually used, i.e. expressing data of one type in terms of data of another type. Natural human languages ​​are conceptual coding systems for expressing thoughts through speech. Closely related to languages ​​are alphabets - systems for coding language components using graphic symbols.

Computer technology also has its own system - it is called binary coding and is based on representing data as a sequence of just two characters: 0 and 1. These characters are called binary digits, in English - binary digit or abbreviated bit. One bit can express two concepts: 0 or 1 (yes or no, black or white, true or false, etc.). If the number of bits is increased to two, then four different concepts can be expressed. Three bits can encode eight different values.

Coding of symbolic (text) information

The main operation performed on individual text characters is character comparison.

When comparing characters, the most important aspects are the uniqueness of the code for each character and the length of this code, and the choice of encoding principle itself is practically irrelevant.

Various conversion tables are used to encode texts. It is important that the same table is used when encoding and decoding the same text.

Conversion table- a table containing a list of encoded symbols, ordered in some way, in accordance with which the symbol is converted into its binary code and vice versa.

The most popular conversion tables: DKOI-8, ASCII, CP1251, Unicode.

Historically, 8 bits or 1 byte was chosen as the code length for character encoding. Therefore, most often one character of text stored in a computer corresponds to one byte of memory.

With a code length of 8 bits, there can be 28 = 256 different combinations of 0 and 1, so no more than 256 characters can be encoded using one conversion table. With a code length of 2 bytes (16 bits), 65536 characters can be encoded.

Encoding numerical information

The similarity in the encoding of numeric and text information is as follows: in order to compare data of this type, different numbers (as well as different characters) must have a different code. The main difference between numeric data and symbolic data is that in addition to the comparison operation, various mathematical operations are performed on numbers: addition, multiplication, root extraction, logarithm calculation, etc. The rules for performing these operations in mathematics are developed in detail for numbers represented in the positional number system.