Ensuring Correct Cryptographic Algorithm and Provider Usage at Compile Time

被引:0
|
作者
Xing, Weitian [1 ]
Cheng, Yuanhui [1 ]
Dietl, Werner [1 ]
机构
[1] Univ Waterloo, Waterloo, ON, Canada
来源
PROCEEDINGS OF THE 23RD ACM INTERNATIONAL WORKSHOP ON FORMAL TECHNIQUES FOR JAVA-LIKE PROGRAMS (FTFJP '21) | 2021年
基金
加拿大自然科学与工程研究理事会;
关键词
!text type='Java']Java[!/text; cryptography; pluggable type system; static analysis;
D O I
10.1145/3464971.3468418
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Using cryptographic APIs to encrypt and decrypt data, calculate digital signatures, or compute hashes is error prone. Weak or unsupported cryptographic algorithms can cause information leakage and runtime exceptions, such as a NoSuchAlgorithmException in Java. Using the wrong cryptographic service provider can also lead to unsupported cryptographic algorithms. Moreover, for Android developers who want to store their key material in the Android Keystore, misused cryptographic algorithms and providers make the key material unsafe. We present the Crypto Checker, a pluggable type system that detects the use of forbidden algorithms and providers at compile time. For typechecked code, the Crypto Checker guarantees that only trusted algorithms and providers are used, and thereby ensures that the cryptographic APIs never cause runtime exceptions or use weak algorithms or providers. The Crypto Checker is easy-to-use: it allows developers to determine which algorithms and providers are permitted by writing specifications using type qualifiers. We implemented the Crypto Checker for Java and evaluated it with 32 open-source Java applications (over 2 million LOC). We found 2 issues that cause runtime exceptions and 62 violations of security recommendations and best practices. We also used the Crypto Checker to analyze 65 examples from a public benchmark of hard security issues and discuss the differences between our approach and a different static analysis in detail.
引用
收藏
页码:43 / 50
页数:8
相关论文
共 35 条
  • [1] CrySL: An Extensible Approach to Validating the Correct Usage of Cryptographic APIs
    Krueger, Stefan
    Spath, Johannes
    Ali, Karim
    Bodden, Eric
    Mezini, Mira
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (11) : 2382 - 2400
  • [2] Serberus: Protecting Cryptographic Code from Spectres at Compile-Time
    Mosier, Nicholas
    Nemati, Hamed
    Mitchell, John C.
    Trippel, Caroline
    45TH IEEE SYMPOSIUM ON SECURITY AND PRIVACY, SP 2024, 2024, : 4200 - 4219
  • [3] CORRECT USAGE OF TERM TIME
    EGIDI, C
    LESCHIUT.S
    ELETTROTECNICA, 1970, 57 (09): : 554 - &
  • [4] USAGE ANALYSIS - A COMPILE-TIME ANALYSIS TO IMPROVE REFERENCE COUNTING
    MAJEED, AC
    MUTHUKRISHNAN, CR
    JOURNAL OF PROGRAMMING LANGUAGES, 1993, 1 (02): : 93 - 102
  • [5] A COMPILE-TIME GRANULARITY ANALYSIS ALGORITHM AND ITS PERFORMANCE EVALUATION
    TICK, E
    ZHONG, X
    NEW GENERATION COMPUTING, 1993, 11 (3-4) : 271 - 295
  • [6] IMPROVED AFFINE PARTITION ALGORITHM FOR COMPILE-TIME AND RUNTIME PERFORMANCE
    Yuan Xinyu
    Li Ying
    Deng Shuiguang
    Cheng Jie
    INTELLIGENT AUTOMATION AND SOFT COMPUTING, 2011, 17 (08): : 1179 - 1191
  • [7] A parallel algorithm for compile-time scheduling of parallel programs on multiprocessors
    Kwok, YK
    Ahmad, I
    1997 INTERNATIONAL CONFERENCE ON PARALLEL ARCHITECTURES AND COMPILATION TECHNIQUES, PROCEEDINGS, 1997, : 90 - 101
  • [8] A Session Type Provider Compile-Time API Generation of Distributed Protocols with Refinements in F#
    Neykova, Rumyana
    Hu, Raymond
    Yoshida, Nobuko
    Abdeljallal, Fahd
    CC'18: PROCEEDINGS OF THE 27TH INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION, 2018, : 128 - 138
  • [9] Compile-time thread distinguishment algorithm on VIM-based architecture
    Xiao-Bo, Yan
    Xue-Jun, Yang
    Pu, Wen
    ADVANCES IN COMPUTER SYSTEMS ARCHITECTURE, PROCEEDINGS, 2006, 4186 : 559 - 566
  • [10] A high performance, low complexity algorithm for compile-time task scheduling in heterogeneous systems
    Hagras, T
    Janecek, J
    PARALLEL COMPUTING, 2005, 31 (07) : 653 - 670