After the concept of the active wiretapper was proposed, integrity protection became more important than ever before. Therefore, message authentication code, a method that protects the message from being modified in an undetectable way, attracts more attention nowadays. In this paper, we propose two new message authentication codes based on almost perfect nonlinear functions and stream ciphers. The security of both new constructions is proved by giving upper bounds of the probability of the successful substitution forgery attacks against our new message authentication codes, and these upper bounds are negligible. We implement our algorithms and compare their time consumption with the time consumption of EIA1, the message authentication code used in the 4G LTE system. The results show that our algorithms are overwhelmingly faster than EIA1. Moreover, our new constructions are resistant to cycling and linear forgery attacks, which can be applied to EIA1. Copyright © 2016 John Wiley & Sons, Ltd.