code: def keygrip_nist256(vk):
      
      curve = vk.curve.curve
      gen = vk.curve.generator
      g = (4 << 512) | (gen.x() << 256) | gen.y()
      point = vk.pubkey.point
      q = (4 << 512) | (point.x() << 256) | point.y()
  
      return _compute_keygrip([
          ['p', util.num2bytes(curve.p(), size=32)],
          ['a', util.num2bytes(curve.a() % curve.p(), size=32)],
          ['b', util.num2bytes(curve.b() % curve.p(), size=32)],
          ['g', util.num2bytes(g, size=65)],
          ['n', util.num2bytes(vk.curve.order, size=32)],
          ['q', util.num2bytes(q, size=65)],
      ])
docs: Compute keygrip for NIST256 curve public keys.