Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

274 lines
4.4 KiB

  1. //
  2. // List of weak and semi-weak DES keys from
  3. // Applied Cryptography: Protocols, Algorithms, and Source Code in C,
  4. // second edition by Bruce Schneier.
  5. //
  6. #define NUM_WEAK_KEYS 16
  7. BOOLEAN
  8. IPSecInitRandom(
  9. VOID
  10. );
  11. VOID
  12. IPSecRngRekey(
  13. IN PVOID Context
  14. );
  15. BOOLEAN
  16. IPSecGenerateRandom(
  17. IN PUCHAR pBuf,
  18. IN ULONG BytesNeeded
  19. );
  20. VOID
  21. IPSecCleanupOutboundSA(
  22. IN PSA_TABLE_ENTRY pInboundSA,
  23. IN PSA_TABLE_ENTRY pOutboundSA,
  24. IN BOOLEAN fNoDelete
  25. );
  26. VOID
  27. IPSecCleanupLarvalSA(
  28. IN PSA_TABLE_ENTRY pSA
  29. );
  30. VOID
  31. IPSecDeleteLarvalSA(
  32. IN PSA_TABLE_ENTRY pSA
  33. );
  34. VOID
  35. IPSecDeleteInboundSA(
  36. IN PSA_TABLE_ENTRY pInboundSA
  37. );
  38. VOID
  39. IPSecExpireInboundSA(
  40. IN PSA_TABLE_ENTRY pInboundSA
  41. );
  42. NTSTATUS
  43. IPSecCheckInboundSA(
  44. IN PSA_STRUCT pSAStruct,
  45. IN PSA_TABLE_ENTRY pSA
  46. );
  47. BOOLEAN
  48. IPSecIsWeakDESKey(
  49. IN PUCHAR Key
  50. );
  51. BOOLEAN
  52. IPSecIsWeak3DESKey(
  53. IN PUCHAR Key
  54. );
  55. NTSTATUS
  56. IPSecPopulateSA(
  57. IN PSA_STRUCT pSAStruct,
  58. IN ULONG KeyLen,
  59. IN PSA_TABLE_ENTRY pSA
  60. );
  61. NTSTATUS
  62. IPSecCreateSA(
  63. OUT PSA_TABLE_ENTRY *ppSA
  64. );
  65. PSA_TABLE_ENTRY
  66. IPSecLookupSABySPI(
  67. IN tSPI SPI,
  68. IN IPAddr DestAddr
  69. );
  70. PSA_TABLE_ENTRY
  71. IPSecLookupSABySPIWithLock(
  72. IN tSPI SPI,
  73. IN IPAddr DestAddr
  74. );
  75. NTSTATUS
  76. IPSecLookupSAByAddr(
  77. IN ULARGE_INTEGER uliSrcDstAddr,
  78. IN ULARGE_INTEGER uliProtoSrcDstPort,
  79. OUT PFILTER *ppFilter,
  80. OUT PSA_TABLE_ENTRY *ppSA,
  81. OUT PSA_TABLE_ENTRY *ppNextSA,
  82. OUT PSA_TABLE_ENTRY *ppTunnelSA,
  83. IN BOOLEAN fOutbound,
  84. IN BOOLEAN fFWPacket,
  85. IN BOOLEAN fBypass
  86. );
  87. NTSTATUS
  88. IPSecLookupTunnelSA(
  89. IN ULARGE_INTEGER uliSrcDstAddr,
  90. IN ULARGE_INTEGER uliProtoSrcDstPort,
  91. OUT PFILTER *ppFilter,
  92. OUT PSA_TABLE_ENTRY *ppSA,
  93. IN BOOLEAN fOutbound
  94. );
  95. NTSTATUS
  96. IPSecLookupMaskedSA(
  97. IN ULARGE_INTEGER uliSrcDstAddr,
  98. IN ULARGE_INTEGER uliProtoSrcDstPort,
  99. OUT PFILTER *ppFilter,
  100. OUT PSA_TABLE_ENTRY *ppSA,
  101. IN BOOLEAN fOutbound
  102. );
  103. NTSTATUS
  104. IPSecAllocateSPI(
  105. OUT tSPI * pSpi,
  106. IN PSA_TABLE_ENTRY pSA
  107. );
  108. NTSTATUS
  109. IPSecNegotiateSA(
  110. IN PFILTER pFilter,
  111. IN ULARGE_INTEGER uliSrcDstAddr,
  112. IN ULARGE_INTEGER uliProtoSrcDstPort,
  113. IN ULONG NewMTU,
  114. OUT PSA_TABLE_ENTRY *ppSA,
  115. IN UCHAR DestType
  116. );
  117. VOID
  118. IPSecFlushQueuedPackets(
  119. IN PSA_TABLE_ENTRY pSA,
  120. IN NTSTATUS status
  121. );
  122. NTSTATUS
  123. IPSecInsertOutboundSA(
  124. IN PSA_TABLE_ENTRY pSA,
  125. IN PIPSEC_ACQUIRE_CONTEXT pAcquireCtx,
  126. IN BOOLEAN fTunnelFilter
  127. );
  128. NTSTATUS
  129. IPSecAddSA(
  130. IN PIPSEC_ADD_SA pAddSA,
  131. IN ULONG TotalSize
  132. );
  133. NTSTATUS
  134. IPSecUpdateSA(
  135. IN PIPSEC_UPDATE_SA pUpdateSA,
  136. IN ULONG TotalSize
  137. );
  138. VOID
  139. IPSecRefSA(
  140. IN PSA_TABLE_ENTRY pSA
  141. );
  142. VOID
  143. IPSecDerefSA(
  144. IN PSA_TABLE_ENTRY pSA
  145. );
  146. VOID
  147. IPSecStopSATimers(
  148. );
  149. VOID
  150. IPSecFlushLarvalSAList(
  151. );
  152. NTSTATUS
  153. IPSecDeleteSA(
  154. IN PIPSEC_DELETE_SA pDeleteSA
  155. );
  156. NTSTATUS
  157. IPSecExpireSA(
  158. IN PIPSEC_EXPIRE_SA pExpireSA
  159. );
  160. VOID
  161. IPSecSAExpired(
  162. IN PIPSEC_TIMER pTimer,
  163. IN PVOID Context
  164. );
  165. VOID
  166. IPSecFillSAInfo(
  167. IN PSA_TABLE_ENTRY pSA,
  168. OUT PIPSEC_SA_INFO pBuf
  169. );
  170. NTSTATUS
  171. IPSecEnumSAs(
  172. IN PIRP pIrp,
  173. OUT PULONG pBytesCopied
  174. );
  175. VOID
  176. IPSecReaper(
  177. IN PIPSEC_TIMER pTimer,
  178. IN PVOID Context
  179. );
  180. VOID
  181. IPSecReapIdleSAs(
  182. );
  183. VOID
  184. IPSecFlushEventLog(
  185. IN PIPSEC_TIMER pTimer,
  186. IN PVOID Context
  187. );
  188. NTSTATUS
  189. IPSecQuerySpi(
  190. IN OUT PIPSEC_QUERY_SPI pQuerySpi
  191. );
  192. NTSTATUS
  193. IPSecSetOperationMode(
  194. IN PIPSEC_SET_OPERATION_MODE pSetOperationMode
  195. );
  196. NTSTATUS
  197. IPSecInitializeTcpip(
  198. IN PIPSEC_SET_TCPIP_STATUS pSetTcpipStatus
  199. );
  200. NTSTATUS
  201. IPSecDeinitializeTcpip(
  202. VOID
  203. );
  204. NTSTATUS
  205. IPSecSetTcpipStatus(
  206. IN PIPSEC_SET_TCPIP_STATUS pSetTcpipStatus
  207. );
  208. NTSTATUS
  209. IPSecResetCacheTable(
  210. VOID
  211. );
  212. NTSTATUS
  213. IPSecPurgeFilterSAs(
  214. IN PFILTER pFilter
  215. );
  216. NTSTATUS
  217. IPSecSetupSALifetime(
  218. IN PSA_TABLE_ENTRY pSA
  219. );
  220. BOOLEAN
  221. IPSecMatchSATemplate(
  222. IN PSA_TABLE_ENTRY pSA,
  223. IN PIPSEC_QM_SA pSATemplate
  224. );