C# parser for extracting cryptographic protocols structure from source code

Cryptographic protocols are the core of any secure system. With the help of them, data is transmitted securely and protected from third parties' negative impact. As a rule, a cryptographic protocol is developed, analyzed using the means of formal verification and, if it is safe, gets its implem...

Full description

Bibliographic Details
Main Authors: Ilya Aleksandrovich Pisarev, Liudmila Klimentevna Babenko
Format: Article
Language:English
Published: Ivannikov Institute for System Programming of the Russian Academy of Sciences 2019-09-01
Series:Труды Института системного программирования РАН
Subjects:
Online Access:https://ispranproceedings.elpub.ru/jour/article/view/1187
_version_ 1818513234219499520
author Ilya Aleksandrovich Pisarev
Liudmila Klimentevna Babenko
author_facet Ilya Aleksandrovich Pisarev
Liudmila Klimentevna Babenko
author_sort Ilya Aleksandrovich Pisarev
collection DOAJ
description Cryptographic protocols are the core of any secure system. With the help of them, data is transmitted securely and protected from third parties' negative impact. As a rule, a cryptographic protocol is developed, analyzed using the means of formal verification and, if it is safe, gets its implementation in the programming language on which the system is developed. However, in the practical implementation of a cryptographic protocol, errors may occur due to the human factor, the assumptions that are necessary for the possibility of implementing the protocol, which entail undermining its security. Thus, it turns out that the protocol itself was initially considered to be safe, but its implementation is in fact not safe. In addition, formal verification uses rather abstract concepts and does not allow to fully analyze the protocol. This paper presents an algorithm for analyzing the source code of the C# programming language to extract the structure of cryptographic protocols. The features of the implementation of protocols in practice are described. The algorithm is based on the searching of important code sections that contain cryptographic protocol-specific constructions and finding of a variable chain transformations from the state of sending or receiving messages to their initial initialization, taking into account possible cryptographic transformations, to compose a tree, from which a simplified structure of a cryptographic protocol will be extracted. The algorithm is implemented in the C# programming language using the Roslyn parser. As an example, a cryptographic protocol is presented that contains the basic operations and functions, namely, asymmetric and symmetric encryption, hashing, signature, random number generation, data concatenation. The analyzer work is shown using this protocol as an example. The future work is described.
first_indexed 2024-12-10T23:58:29Z
format Article
id doaj.art-82398b70f197447cb1cded1c55de9062
institution Directory Open Access Journal
issn 2079-8156
2220-6426
language English
last_indexed 2024-12-10T23:58:29Z
publishDate 2019-09-01
publisher Ivannikov Institute for System Programming of the Russian Academy of Sciences
record_format Article
series Труды Института системного программирования РАН
spelling doaj.art-82398b70f197447cb1cded1c55de90622022-12-22T01:28:32ZengIvannikov Institute for System Programming of the Russian Academy of SciencesТруды Института системного программирования РАН2079-81562220-64262019-09-0131319120210.15514/ISPRAS-2019-31(3)-151175C# parser for extracting cryptographic protocols structure from source codeIlya Aleksandrovich Pisarev0Liudmila Klimentevna Babenko1Южный федеральный университет, ТаганрогЮжный федеральный университет, ТаганрогCryptographic protocols are the core of any secure system. With the help of them, data is transmitted securely and protected from third parties' negative impact. As a rule, a cryptographic protocol is developed, analyzed using the means of formal verification and, if it is safe, gets its implementation in the programming language on which the system is developed. However, in the practical implementation of a cryptographic protocol, errors may occur due to the human factor, the assumptions that are necessary for the possibility of implementing the protocol, which entail undermining its security. Thus, it turns out that the protocol itself was initially considered to be safe, but its implementation is in fact not safe. In addition, formal verification uses rather abstract concepts and does not allow to fully analyze the protocol. This paper presents an algorithm for analyzing the source code of the C# programming language to extract the structure of cryptographic protocols. The features of the implementation of protocols in practice are described. The algorithm is based on the searching of important code sections that contain cryptographic protocol-specific constructions and finding of a variable chain transformations from the state of sending or receiving messages to their initial initialization, taking into account possible cryptographic transformations, to compose a tree, from which a simplified structure of a cryptographic protocol will be extracted. The algorithm is implemented in the C# programming language using the Roslyn parser. As an example, a cryptographic protocol is presented that contains the basic operations and functions, namely, asymmetric and symmetric encryption, hashing, signature, random number generation, data concatenation. The analyzer work is shown using this protocol as an example. The future work is described.https://ispranproceedings.elpub.ru/jour/article/view/1187криптографические протоколыc #парсерверификациядеревоанализисходный код.
spellingShingle Ilya Aleksandrovich Pisarev
Liudmila Klimentevna Babenko
C# parser for extracting cryptographic protocols structure from source code
Труды Института системного программирования РАН
криптографические протоколы
c #
парсер
верификация
дерево
анализ
исходный код.
title C# parser for extracting cryptographic protocols structure from source code
title_full C# parser for extracting cryptographic protocols structure from source code
title_fullStr C# parser for extracting cryptographic protocols structure from source code
title_full_unstemmed C# parser for extracting cryptographic protocols structure from source code
title_short C# parser for extracting cryptographic protocols structure from source code
title_sort c parser for extracting cryptographic protocols structure from source code
topic криптографические протоколы
c #
парсер
верификация
дерево
анализ
исходный код.
url https://ispranproceedings.elpub.ru/jour/article/view/1187
work_keys_str_mv AT ilyaaleksandrovichpisarev cparserforextractingcryptographicprotocolsstructurefromsourcecode
AT liudmilaklimentevnababenko cparserforextractingcryptographicprotocolsstructurefromsourcecode