BIP Shamir amended for Matt's changes