status-go/vendor/github.com/flynn/noise/patterns.go

142 lines
3.8 KiB
Go
Raw Normal View History

package noise
var HandshakeNN = HandshakePattern{
Name: "NN",
Messages: [][]MessagePattern{
{MessagePatternE},
{MessagePatternE, MessagePatternDHEE},
},
}
var HandshakeKN = HandshakePattern{
Name: "KN",
InitiatorPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE},
{MessagePatternE, MessagePatternDHEE, MessagePatternDHSE},
},
}
var HandshakeNK = HandshakePattern{
Name: "NK",
ResponderPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHES},
{MessagePatternE, MessagePatternDHEE},
},
}
var HandshakeKK = HandshakePattern{
Name: "KK",
InitiatorPreMessages: []MessagePattern{MessagePatternS},
ResponderPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHES, MessagePatternDHSS},
{MessagePatternE, MessagePatternDHEE, MessagePatternDHSE},
},
}
var HandshakeNX = HandshakePattern{
Name: "NX",
Messages: [][]MessagePattern{
{MessagePatternE},
{MessagePatternE, MessagePatternDHEE, MessagePatternS, MessagePatternDHES},
},
}
var HandshakeKX = HandshakePattern{
Name: "KX",
InitiatorPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE},
{MessagePatternE, MessagePatternDHEE, MessagePatternDHSE, MessagePatternS, MessagePatternDHES},
},
}
var HandshakeXN = HandshakePattern{
Name: "XN",
Messages: [][]MessagePattern{
{MessagePatternE},
{MessagePatternE, MessagePatternDHEE},
{MessagePatternS, MessagePatternDHSE},
},
}
var HandshakeIN = HandshakePattern{
Name: "IN",
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternS},
{MessagePatternE, MessagePatternDHEE, MessagePatternDHSE},
},
}
var HandshakeXK = HandshakePattern{
Name: "XK",
ResponderPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHES},
{MessagePatternE, MessagePatternDHEE},
{MessagePatternS, MessagePatternDHSE},
},
}
var HandshakeIK = HandshakePattern{
Name: "IK",
ResponderPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHES, MessagePatternS, MessagePatternDHSS},
{MessagePatternE, MessagePatternDHEE, MessagePatternDHSE},
},
}
var HandshakeXX = HandshakePattern{
Name: "XX",
Messages: [][]MessagePattern{
{MessagePatternE},
{MessagePatternE, MessagePatternDHEE, MessagePatternS, MessagePatternDHES},
{MessagePatternS, MessagePatternDHSE},
},
}
var HandshakeXXfallback = HandshakePattern{
2021-10-19 13:43:41 +00:00
Name: "XXfallback",
ResponderPreMessages: []MessagePattern{MessagePatternE},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHEE, MessagePatternS, MessagePatternDHSE},
{MessagePatternS, MessagePatternDHES},
},
}
var HandshakeIX = HandshakePattern{
Name: "IX",
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternS},
{MessagePatternE, MessagePatternDHEE, MessagePatternDHSE, MessagePatternS, MessagePatternDHES},
},
}
var HandshakeN = HandshakePattern{
Name: "N",
ResponderPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHES},
},
}
var HandshakeK = HandshakePattern{
Name: "K",
InitiatorPreMessages: []MessagePattern{MessagePatternS},
ResponderPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHES, MessagePatternDHSS},
},
}
var HandshakeX = HandshakePattern{
Name: "X",
ResponderPreMessages: []MessagePattern{MessagePatternS},
Messages: [][]MessagePattern{
{MessagePatternE, MessagePatternDHES, MessagePatternS, MessagePatternDHSS},
},
}