tweak method

  1. @override
ParticipantKeyInfo? tweak(
  1. Uint8List scalar
)
override

Tweaks the signing key info by a scalar. null may be returned if the scalar was crafted to lead to an invalid key or private share.

Implementation

@override
/// Tweaks the signing key info by a scalar. null may be returned if the
/// scalar was crafted to lead to an invalid key or private share.
ParticipantKeyInfo? tweak(Uint8List scalar) {
  final newGroup = group.tweak(scalar);
  final newShares = publicShares.tweak(scalar);
  final newPrivate = private.tweak(scalar);
  return newGroup == null || newShares == null || newPrivate == null
    ? null
    : ParticipantKeyInfo(
      group: newGroup,
      publicShares: newShares,
      private: newPrivate,
    );
}