Secret sharing for javascript