optimize code for calculation of additional data signature