Skip to content

Implementation Status #5

Description

@emoose

TODO:

  • update list below with implemented functions
  • add XeKeys functions to list
  • check bootloaders/HV for any other functions that are used outside of XeCrypt-internal stuff
  • add test vectors for each function
  • ensure all _STATE structs are byteswapped before/after accesses to them

Kernel: 67/88

Export NameLocationImplementedHas Tests?Notes
XeCryptAesKeyKernel✔️
XeCryptAesEcbKernel✔️
XeCryptAesCbcKernel✔️
XeCryptBnDwLeDhEqualBaseKernel
XeCryptBnDwLeDhInvalBaseKernel
XeCryptBnDwLeDhModExpKernel
XeCryptBnDw_CopyKernel✔️
XeCryptBnDw_SwapLeBeKernel✔️
XeCryptBnDw_ZeroKernel✔️
XeCryptBnDwLePkcs1FormatKernel
XeCryptBnDwLePkcs1VerifyKernel
XeCryptBnQwBeSigCreateKernel
XeCryptBnQwBeSigFormatKernel✔️
XeCryptBnQwBeSigVerifyKernel✔️
XeCryptBnQwNeModExpKernel
XeCryptBnQwNeModExpRootKernel
XeCryptBnQwNeModInvKernel✔️
XeCryptBnQwNeModMulKernel✔️
XeCryptBnQwNeRsaKeyGenKernel
XeCryptBnQwNeRsaPrvCryptKernel
XeCryptBnQwNeRsaPubCryptKernel✔️
XeCryptBnQw_CopyKernel✔️
XeCryptBnQw_SwapDwQwKernel✔️
XeCryptBnQw_SwapDwQwLeBeKernel✔️
XeCryptBnQw_SwapLeBeKernel✔️
XeCryptBnQw_ZeroKernel✔️
XeCryptChainAndSumMacKernel✔️
XeCryptDesParityKernel✔️
XeCryptDesKeyKernel✔️
XeCryptDesEcbKernel✔️
XeCryptDesCbcKernel✔️
XeCryptDes3KeyKernel✔️
XeCryptDes3EcbKernel✔️
XeCryptDes3CbcKernel✔️
XeCryptHmacMd5InitKernel✔️
XeCryptHmacMd5UpdateKernel✔️
XeCryptHmacMd5FinalKernel✔️
XeCryptHmacMd5Kernel✔️
XeCryptHmacShaInitKernel✔️
XeCryptHmacShaUpdateKernel✔️
XeCryptHmacShaFinalKernel✔️
XeCryptHmacShaKernel✔️
XeCryptHmacShaVerifyKernel✔️
XeCryptMd5InitKernel✔️
XeCryptMd5UpdateKernel✔️
XeCryptMd5FinalKernel✔️
XeCryptMd5Kernel✔️
XeCryptParveEcbKernel✔️
XeCryptParveCbcMacKernel✔️
XeCryptRandomKernelUses RC4 with a static RC4_STATE, inited by Hypervisor during boot - is it possible to find what that initial value is?
XeCryptRc4KeyKernel✔️
XeCryptRc4EcbKernel✔️
XeCryptRc4Kernel✔️
XeCryptRotSumShaKernel✔️
XeCryptShaInitKernel✔️
XeCryptShaUpdateKernel✔️
XeCryptShaFinalKernel✔️
XeCryptShaKernel✔️
XeCryptSha256InitKernel✔️
XeCryptSha256UpdateKernel✔️
XeCryptSha256FinalKernel✔️
XeCryptSha256Kernel✔️
XeCryptSha384InitKernel✔️
XeCryptSha384UpdateKernel✔️
XeCryptSha384FinalKernel✔️
XeCryptSha384Kernel✔️
XeCryptSha512InitKernel✔️
XeCryptSha512UpdateKernel✔️
XeCryptSha512FinalKernel✔️
XeCryptSha512Kernel✔️
XeCryptBnQwNeCompareKernel✔️
XeCryptAesCtrKernel
XeCryptAesCbcMacKernel
XeCryptAesDmMacKernel
XeCryptSha224InitKernel✔️
XeCryptAesCreateKeyScheduleKernel✔️
XeCryptAesEncryptOneKernel✔️
XeCryptAesDecryptOneKernel✔️
XeCryptAesCbcEncryptKernel✔️
XeCryptAesCbcDecryptKernel✔️
XeCryptAesGcmInitializeKernel
XeCryptAesGcmUpdateKernel
XeCryptAesGcmFinalizeKernel
XeCryptEccGetCurveParametersKernel✔️Weird function, returns an address to a uint32? Is there anything that uses this we can look at?
XeCryptEccEcdhGenerateKeypairKernel
XeCryptEccEcdhExponentiateKernel
XeCryptEccEcdsaGenerateSignatureKernel
XeCryptEccEcdsaVerifySignatureKernel

Extra: 2/8

These are mentioned in a header file available on pastebin, doesn't seem like kernel has them included though, need to see if any bootloaders or other OS files might include them (otherwise there's not really any way to tell how they're implemented...)

If nothing uses them I guess they aren't that important, but still worth mentioning for completeness sake.

Export NameLocationImplementedHas Tests?Notes
XeCryptBnQwNeRsaPrvExpFromRootHeaderGenerates private exponent for input private key?
XeCryptBnQwBeSigDifferenceHeader (+ Bootloaders/HV?)✔️Mostly same as SigVerify but "returns difference"?
XeCryptMemDiff1BL✔️Used by SigDifference
XeCryptBnQwNeEcSigVerifyHeaderElliptic curve
XeCryptEmeOaepPackHeader
XeCryptEmeOaepUnpackHeader
XeCryptPkcs1ReverseBytesHeaderRelated to the EmeOaep funcs above
XeCryptOmac1ComputeHeader

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions