Lars-Åke Fredlund , Clara Benac Earle , Thomas Arts , Hans Svensson
{"title":"Gaining trust by tracing security protocols","authors":"Lars-Åke Fredlund , Clara Benac Earle , Thomas Arts , Hans Svensson","doi":"10.1016/j.jlamp.2022.100829","DOIUrl":null,"url":null,"abstract":"<div><p><span>In this article, a novel form of white-box testing is used to test an implementation of the Noise Cryptographic Protocol Framework, which is used as an integral component in a commercial </span>blockchain<span><span>. Our approach extends the normal interoperability testing, where the noise implementation under test, written in the Erlang programming language, is tested against an implementation of the Noise protocol framework written in the </span>C programming language<span>. Testing typically performs a noise protocol handshake<span> between the two implementations. If successful, then both implementations are considered compatible. However, such testing does not, for example, detect whether the Erlang implementation incorrectly reuse session keys that should have been newly generated. In this article, such interoperability testing is extended to also check that keys and information transmitted in protocol handshakes is correctly constructed, e.g., that session keys are freshly generated by calling the correct low-level cryptographic libraries. Such extended, white-box testing, begins by tracing the Erlang Noise implementation during protocol handshakes with the C programming protocol implementation. The resulting protocol trace is refactored, obtaining as the end result a symbolic description (a functional term) of how key protocol values are constructed using cryptographic operations and keys. Thereafter, this symbolic term is compared, using term rewriting, with another symbolic term representing the ideal symbolic execution of the tested Noise protocol handshake, i.e., the “semantics” of the handshake. The semantic symbolic term is obtained by executing a symbolic implementation of the noise protocol that we have developed, which very closely follows the semi-formal authoritative description of the Noise protocol framework.</span></span></span></p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"130 ","pages":"Article 100829"},"PeriodicalIF":0.7000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Logical and Algebraic Methods in Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2352220822000827","RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
In this article, a novel form of white-box testing is used to test an implementation of the Noise Cryptographic Protocol Framework, which is used as an integral component in a commercial blockchain. Our approach extends the normal interoperability testing, where the noise implementation under test, written in the Erlang programming language, is tested against an implementation of the Noise protocol framework written in the C programming language. Testing typically performs a noise protocol handshake between the two implementations. If successful, then both implementations are considered compatible. However, such testing does not, for example, detect whether the Erlang implementation incorrectly reuse session keys that should have been newly generated. In this article, such interoperability testing is extended to also check that keys and information transmitted in protocol handshakes is correctly constructed, e.g., that session keys are freshly generated by calling the correct low-level cryptographic libraries. Such extended, white-box testing, begins by tracing the Erlang Noise implementation during protocol handshakes with the C programming protocol implementation. The resulting protocol trace is refactored, obtaining as the end result a symbolic description (a functional term) of how key protocol values are constructed using cryptographic operations and keys. Thereafter, this symbolic term is compared, using term rewriting, with another symbolic term representing the ideal symbolic execution of the tested Noise protocol handshake, i.e., the “semantics” of the handshake. The semantic symbolic term is obtained by executing a symbolic implementation of the noise protocol that we have developed, which very closely follows the semi-formal authoritative description of the Noise protocol framework.
期刊介绍:
The Journal of Logical and Algebraic Methods in Programming is an international journal whose aim is to publish high quality, original research papers, survey and review articles, tutorial expositions, and historical studies in the areas of logical and algebraic methods and techniques for guaranteeing correctness and performability of programs and in general of computing systems. All aspects will be covered, especially theory and foundations, implementation issues, and applications involving novel ideas.