{"record":{"id":"88279e142ba6c012","repo":"XTLS/Xray-core","slug":"empty-nfsskeysbytes","errorCode":null,"errorMessage":"empty nfsSKeysBytes","messagePattern":"empty nfsSKeysBytes","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/vless/encryption/server.go","lineNumber":49,"sourceCode":"\tSecondsFrom   int64\n\tSecondsTo     int64\n\tPaddingLens   [][3]int\n\tPaddingGaps   [][3]int\n\n\tRWLock   sync.RWMutex\n\tClosed   bool\n\tLasts    map[int64][16]byte\n\tTickets  [][16]byte\n\tSessions map[[16]byte]*ServerSession\n}\n\nfunc (i *ServerInstance) Init(nfsSKeysBytes [][]byte, xorMode uint32, secondsFrom, secondsTo int64, padding string) (err error) {\n\tif i.NfsSKeys != nil {\n\t\treturn errors.New(\"already initialized\")\n\t}\n\tl := len(nfsSKeysBytes)\n\tif l == 0 {\n\t\treturn errors.New(\"empty nfsSKeysBytes\")\n\t}\n\ti.NfsSKeys = make([]any, l)\n\ti.NfsPKeysBytes = make([][]byte, l)\n\ti.Hash32s = make([][32]byte, l)\n\tfor j, k := range nfsSKeysBytes {\n\t\tif len(k) == 32 {\n\t\t\tif i.NfsSKeys[j], err = ecdh.X25519().NewPrivateKey(k); err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ti.NfsPKeysBytes[j] = i.NfsSKeys[j].(*ecdh.PrivateKey).PublicKey().Bytes()\n\t\t\ti.RelaysLength += 32 + 32\n\t\t} else {\n\t\t\tif i.NfsSKeys[j], err = mlkem.NewDecapsulationKey768(k); err != nil {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ti.NfsPKeysBytes[j] = i.NfsSKeys[j].(*mlkem.DecapsulationKey768).EncapsulationKey().Bytes()\n\t\t\ti.RelaysLength += 1088 + 32\n\t\t}","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/vless/encryption/server.go#L31-L67","documentation":"Error \"empty nfsSKeysBytes\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at proxy/vless/encryption/server.go:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}