Lightweight block cipher algorithm identification scheme based on transformer
摘要
The current research on cryptographic algorithm identification has gradually matured in block ciphers, but the research on lightweight block ciphers has just started, there are few research results, and the factors that affect the research results of cryptographic algorithm identification are too single-minded; at the same time, traditional machine learning algorithms cannot effectively process ciphertext containing a large amount of data and structural information, resulting in the limitation of reduced identification rate. The transformer-based lightweight block cipher algorithm single-layer and multi-layer identification schemes are proposed, and the ciphertext feature extraction methods in NIST randomness test and entropy test are improved. The single-layer identification scheme bisects each of the four lightweight block cipher algorithms KASUMI, SIMON, CLEFLA and PRESENT. Experiments have shown that compared to three traditional machine learning methods, this scheme achieves an average identification rate improvement of over 30% when using fixed key encryption. There is also a significant improvement compared to traditional machine learning methods when using random key encryption. The multi-layer identification scheme uses the transformer model to first perform S-F cluster classification (SP-Feistel structure) on six lightweight block cipher algorithms, KASUMI, SKINNY, CLEFLA, PRESENT, SIMON and Midori, and then performs single classification under the same structure cluster. Experiments show that compared with the identification rate of 54.2% for six-category identification using a single-layer Transformer, this scheme has superior accuracy and stability.