   return 0
 }
 
-func crypto_sign_open(_ m: inout [Int], _ sm:[Int], _ _n:Int, _ pk:[Int]) -> Int {
-  var t = [Int](repeating: 0, count: 32)
-  var h = [Int](repeating: 0, count: 64)
+func crypto_sign_open(_ m: inout [UInt8], _ sm:[UInt8], _ _n:Int, _ pk:[UInt8]) -> Int {
+  var t = [UInt8](repeating: 0, count: 32)
+  var h = [UInt8](repeating: 0, count: 64)
   var p: [[Int64]] = [gf(), gf(), gf(), gf()]
   var q: [[Int64]] = [gf(), gf(), gf(), gf()]
   var n = _n

var keys = axlsign.generateKeyPair(seed)

var rnd = axlsign.randomBytes(64)
var msg = strToArray("lo esencial es invisible a los ojos !...")

var sig = axlsign.sign(secretKey: keys.privateKey, msg: msg, opt_random: rnd)
var res = axlsign.verify(publicKey: keys.publicKey, msg: msg, signature: sig)

             0xd7a7, 0x3dfb, 0x0099, 0x2b4d,
             0xdf0b, 0x4fc1, 0x2480, 0x2b83] )

func ts64(_ x: inout [UInt8], _ i: Int, _ h:Int, _ l:Int) {
  x[i]   = UInt8( (h >> 24) & 0xff )
  x[i+1] = UInt8( (h >> 16) & 0xff )
  x[i+2] = UInt8( (h >>  8) & 0xff )
  x[i+3] = UInt8( h & 0xff )
  x[i+4] = UInt8( (l >> 24) & 0xff )
  x[i+5] = UInt8( (l >> 16) & 0xff )
  x[i+6] = UInt8 ( (l >>  8) & 0xff )
  x[i+7] = UInt8( l & 0xff )
}

func vn(_ x:[UInt8], _ xi:Int, _ y:[UInt8], _ yi:Int, _ n:Int) -> Int {
    var d: UInt8 = 0
    for i in 0..<n {
        d = d | ( x[xi+i] ^ y[yi+i] )
    }
    return (1 & ( ( Int(d) - 1 ) >>> 8 ) ) - 1
}

func crypto_verify_32(_ x:[UInt8], _ xi:Int, _ y:[UInt8], _ yi:Int) -> Int {
  return vn(x,xi,y,yi,32)
}

