TY - GEN
T1 - CogniCryptgen
T2 - 18th ACM/IEEE International Symposium on Code Generation and Optimization, CGO 2020
AU - Kruger, Stefan
AU - Ali, Karim
AU - Bodden, Eric
N1 - Publisher Copyright:
© 2020 Copyright held by the owner/author(s).
PY - 2020/2/22
Y1 - 2020/2/22
N2 - Many software applications are insecure because they misuse cryptographic APIs. Prior attempts to address misuses focused on detecting them after the fact. However, avoiding such misuses in the first place would significantly reduce development cost. In this paper,we present CogniCryptgen, a code generator that proactively assists developers in using Java crypto APIs correctly. CogniCryptgen accepts as input a code template and API-usage rules defined in the specification language CrySL. The code templates in CogniCryptgen are minimal, only comprising simple glue code. All security-sensitive code is generated fully automatically from the CrySL rules that the templates merely refer to. That way, generated code is provably correct and secure with respect to the CrySL definitions. CogniCryptgen supports the implementation of the most common cryptographic use cases, ranging from password-based encryption to digital signatures. We have empirically evaluated CogniCryptgen from the perspectives of both crypto-API developers and application developers. Our results show that CogniCryptgen is fast enough to be used during development. Compared to a stateof- the-art template-based solution, implementing use cases with CogniCryptgen requires only a fourth of development effort, without any additional language skills. Real-world developers see CogniCryptgen as significantly simpler to use than the same template-based solution.
AB - Many software applications are insecure because they misuse cryptographic APIs. Prior attempts to address misuses focused on detecting them after the fact. However, avoiding such misuses in the first place would significantly reduce development cost. In this paper,we present CogniCryptgen, a code generator that proactively assists developers in using Java crypto APIs correctly. CogniCryptgen accepts as input a code template and API-usage rules defined in the specification language CrySL. The code templates in CogniCryptgen are minimal, only comprising simple glue code. All security-sensitive code is generated fully automatically from the CrySL rules that the templates merely refer to. That way, generated code is provably correct and secure with respect to the CrySL definitions. CogniCryptgen supports the implementation of the most common cryptographic use cases, ranging from password-based encryption to digital signatures. We have empirically evaluated CogniCryptgen from the perspectives of both crypto-API developers and application developers. Our results show that CogniCryptgen is fast enough to be used during development. Compared to a stateof- the-art template-based solution, implementing use cases with CogniCryptgen requires only a fourth of development effort, without any additional language skills. Real-world developers see CogniCryptgen as significantly simpler to use than the same template-based solution.
KW - Code Generation
KW - Code Templates
KW - Cryptographic Misuse
KW - Security Specifications
UR - http://www.scopus.com/inward/record.url?scp=85082129307&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85082129307&partnerID=8YFLogxK
U2 - 10.1145/3368826.3377905
DO - 10.1145/3368826.3377905
M3 - Conference contribution
AN - SCOPUS:85082129307
T3 - CGO 2020 - Proceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization
SP - 185
EP - 198
BT - CGO 2020 - Proceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization
A2 - Mars, Jason
A2 - Tang, Lingjia
A2 - Xue, Jingling
A2 - Wu, Peng
PB - Association for Computing Machinery, Inc
Y2 - 22 February 2020 through 26 February 2020
ER -