signature calculation