pi-codex-auto-review 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1034) hide show
  1. package/README.md +19 -10
  2. package/dist/approval-commands.d.ts +4 -0
  3. package/dist/approval-commands.js +176 -0
  4. package/dist/approval-commands.js.map +1 -0
  5. package/dist/approval-settings.d.ts +9 -0
  6. package/dist/approval-settings.js +40 -0
  7. package/dist/approval-settings.js.map +1 -0
  8. package/dist/approvals.d.ts +2 -1
  9. package/dist/approvals.js +3 -2
  10. package/dist/approvals.js.map +1 -1
  11. package/dist/cli.js +5 -5
  12. package/dist/cli.js.map +1 -1
  13. package/dist/contracts.d.ts +2 -0
  14. package/dist/contracts.js.map +1 -1
  15. package/dist/index.d.ts +2 -2
  16. package/dist/index.js +26 -38
  17. package/dist/index.js.map +1 -1
  18. package/dist/policy/index.d.ts +0 -1
  19. package/dist/policy/index.js +11 -32
  20. package/dist/policy/index.js.map +1 -1
  21. package/dist/review/context.d.ts +14 -1
  22. package/dist/review/context.js +83 -13
  23. package/dist/review/context.js.map +1 -1
  24. package/dist/review/investigation.d.ts +3 -3
  25. package/dist/review/investigation.js +1 -1
  26. package/dist/review/investigation.js.map +1 -1
  27. package/dist/review/lifecycle.js +2 -2
  28. package/dist/review/lifecycle.js.map +1 -1
  29. package/dist/review/policy.js +20 -3
  30. package/dist/review/policy.js.map +1 -1
  31. package/dist/review/user-input.d.ts +5 -0
  32. package/dist/review/user-input.js +31 -0
  33. package/dist/review/user-input.js.map +1 -0
  34. package/dist/reviewer.d.ts +11 -1
  35. package/dist/reviewer.js +12 -2
  36. package/dist/reviewer.js.map +1 -1
  37. package/dist/tools/controller.d.ts +11 -6
  38. package/dist/tools/controller.js +102 -55
  39. package/dist/tools/controller.js.map +1 -1
  40. package/dist/tools/environment.d.ts +2 -0
  41. package/dist/tools/environment.js +9 -0
  42. package/dist/tools/environment.js.map +1 -0
  43. package/dist/tools/executor.d.ts +14 -0
  44. package/dist/tools/executor.js +75 -0
  45. package/dist/tools/executor.js.map +1 -0
  46. package/dist/tools/external.d.ts +1 -0
  47. package/dist/tools/external.js.map +1 -1
  48. package/dist/tools/mcp.js +1 -0
  49. package/dist/tools/mcp.js.map +1 -1
  50. package/dist/tools/mutation-queue.d.ts +1 -0
  51. package/dist/tools/mutation-queue.js +16 -0
  52. package/dist/tools/mutation-queue.js.map +1 -0
  53. package/docs/publishing.md +7 -7
  54. package/docs/security/dependencies.md +13 -3
  55. package/docs/testing/auto-review-protection.md +31 -8
  56. package/docs/usage.md +33 -18
  57. package/package.json +11 -14
  58. package/dist/sandbox/broker.d.ts +0 -1
  59. package/dist/sandbox/broker.js +0 -139
  60. package/dist/sandbox/broker.js.map +0 -1
  61. package/dist/sandbox/config.d.ts +0 -5
  62. package/dist/sandbox/config.js +0 -97
  63. package/dist/sandbox/config.js.map +0 -1
  64. package/dist/sandbox/directory-scan.d.ts +0 -1
  65. package/dist/sandbox/directory-scan.js +0 -32
  66. package/dist/sandbox/directory-scan.js.map +0 -1
  67. package/dist/sandbox/executor.d.ts +0 -20
  68. package/dist/sandbox/executor.js +0 -146
  69. package/dist/sandbox/executor.js.map +0 -1
  70. package/dist/sandbox/hard-links.d.ts +0 -4
  71. package/dist/sandbox/hard-links.js +0 -155
  72. package/dist/sandbox/hard-links.js.map +0 -1
  73. package/dist/sandbox/linux-read-paths.d.ts +0 -7
  74. package/dist/sandbox/linux-read-paths.js +0 -47
  75. package/dist/sandbox/linux-read-paths.js.map +0 -1
  76. package/dist/sandbox/paths.d.ts +0 -3
  77. package/dist/sandbox/paths.js +0 -10
  78. package/dist/sandbox/paths.js.map +0 -1
  79. package/dist/sandbox/runtime-write-paths.d.ts +0 -2
  80. package/dist/sandbox/runtime-write-paths.js +0 -8
  81. package/dist/sandbox/runtime-write-paths.js.map +0 -1
  82. package/dist/sandbox/seccomp.d.ts +0 -5
  83. package/dist/sandbox/seccomp.js +0 -16
  84. package/dist/sandbox/seccomp.js.map +0 -1
  85. package/dist/sandbox/worker.d.ts +0 -1
  86. package/dist/sandbox/worker.js +0 -78
  87. package/dist/sandbox/worker.js.map +0 -1
  88. package/node_modules/@anthropic-ai/sandbox-runtime/LICENSE +0 -201
  89. package/node_modules/@anthropic-ai/sandbox-runtime/README.md +0 -901
  90. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts +0 -3
  91. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts.map +0 -1
  92. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js +0 -472
  93. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js.map +0 -1
  94. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts +0 -19
  95. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts.map +0 -1
  96. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js +0 -17
  97. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js.map +0 -1
  98. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts +0 -52
  99. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts.map +0 -1
  100. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js +0 -153
  101. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js.map +0 -1
  102. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts +0 -164
  103. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts.map +0 -1
  104. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js +0 -246
  105. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js.map +0 -1
  106. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts +0 -58
  107. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts.map +0 -1
  108. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js +0 -128
  109. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js.map +0 -1
  110. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts +0 -124
  111. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts.map +0 -1
  112. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js +0 -258
  113. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js.map +0 -1
  114. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts +0 -87
  115. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts.map +0 -1
  116. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js +0 -138
  117. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js.map +0 -1
  118. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts +0 -67
  119. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts.map +0 -1
  120. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js +0 -113
  121. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js.map +0 -1
  122. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts +0 -70
  123. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts.map +0 -1
  124. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js +0 -171
  125. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js.map +0 -1
  126. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts +0 -120
  127. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts.map +0 -1
  128. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js +0 -281
  129. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js.map +0 -1
  130. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts +0 -108
  131. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts.map +0 -1
  132. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js +0 -208
  133. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js.map +0 -1
  134. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts +0 -82
  135. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts.map +0 -1
  136. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js +0 -155
  137. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js.map +0 -1
  138. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts +0 -44
  139. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts.map +0 -1
  140. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js +0 -220
  141. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js.map +0 -1
  142. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts +0 -150
  143. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts.map +0 -1
  144. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js +0 -678
  145. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js.map +0 -1
  146. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts +0 -32
  147. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts.map +0 -1
  148. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js +0 -111
  149. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js.map +0 -1
  150. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts +0 -305
  151. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts.map +0 -1
  152. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js +0 -2605
  153. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js.map +0 -1
  154. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts +0 -55
  155. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts.map +0 -1
  156. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js +0 -152
  157. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js.map +0 -1
  158. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts +0 -12
  159. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts.map +0 -1
  160. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js +0 -43
  161. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js.map +0 -1
  162. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts +0 -116
  163. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts.map +0 -1
  164. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js +0 -1195
  165. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js.map +0 -1
  166. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts +0 -200
  167. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts.map +0 -1
  168. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js +0 -443
  169. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js.map +0 -1
  170. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts +0 -28
  171. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts.map +0 -1
  172. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js +0 -114
  173. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js.map +0 -1
  174. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts +0 -59
  175. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts.map +0 -1
  176. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js +0 -159
  177. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js.map +0 -1
  178. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts +0 -147
  179. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts.map +0 -1
  180. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js +0 -445
  181. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js.map +0 -1
  182. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts +0 -17
  183. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts.map +0 -1
  184. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js +0 -163
  185. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js.map +0 -1
  186. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts +0 -83
  187. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts.map +0 -1
  188. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js +0 -212
  189. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js.map +0 -1
  190. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts +0 -76
  191. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts.map +0 -1
  192. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js +0 -221
  193. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js.map +0 -1
  194. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts +0 -1691
  195. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts.map +0 -1
  196. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js +0 -1233
  197. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js.map +0 -1
  198. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts +0 -97
  199. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts.map +0 -1
  200. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js +0 -1937
  201. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js.map +0 -1
  202. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts +0 -113
  203. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts.map +0 -1
  204. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js +0 -3
  205. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js.map +0 -1
  206. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts +0 -411
  207. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts.map +0 -1
  208. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js +0 -1408
  209. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js.map +0 -1
  210. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts +0 -37
  211. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts.map +0 -1
  212. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js +0 -125
  213. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js.map +0 -1
  214. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts +0 -57
  215. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts.map +0 -1
  216. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js +0 -332
  217. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js.map +0 -1
  218. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts +0 -100
  219. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts.map +0 -1
  220. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js +0 -546
  221. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js.map +0 -1
  222. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts +0 -923
  223. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts.map +0 -1
  224. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js +0 -1419
  225. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js.map +0 -1
  226. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts +0 -31
  227. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts.map +0 -1
  228. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js +0 -69
  229. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js.map +0 -1
  230. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts +0 -7
  231. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts.map +0 -1
  232. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js +0 -25
  233. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js.map +0 -1
  234. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts +0 -15
  235. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts.map +0 -1
  236. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js +0 -49
  237. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js.map +0 -1
  238. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts +0 -17
  239. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts.map +0 -1
  240. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js +0 -37
  241. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js.map +0 -1
  242. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts +0 -27
  243. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts.map +0 -1
  244. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js +0 -47
  245. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js.map +0 -1
  246. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts +0 -9
  247. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts.map +0 -1
  248. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js +0 -25
  249. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js.map +0 -1
  250. package/node_modules/@anthropic-ai/sandbox-runtime/package.json +0 -88
  251. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/build.ts +0 -95
  252. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/srt-proxy-agent.jar +0 -0
  253. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/arm64/apply-seccomp +0 -0
  254. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/build.ts +0 -69
  255. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/x64/apply-seccomp +0 -0
  256. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/arm64/srt-win.exe +0 -0
  257. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/build.ts +0 -28
  258. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/x64/srt-win.exe +0 -0
  259. package/node_modules/@pondwader/socks5-server/.github/workflows/ci.yml +0 -27
  260. package/node_modules/@pondwader/socks5-server/LICENSE +0 -20
  261. package/node_modules/@pondwader/socks5-server/README.md +0 -151
  262. package/node_modules/@pondwader/socks5-server/dist/index.d.mts +0 -87
  263. package/node_modules/@pondwader/socks5-server/dist/index.d.ts +0 -87
  264. package/node_modules/@pondwader/socks5-server/dist/index.js +0 -346
  265. package/node_modules/@pondwader/socks5-server/dist/index.mjs +0 -307
  266. package/node_modules/@pondwader/socks5-server/package.json +0 -31
  267. package/node_modules/commander/LICENSE +0 -22
  268. package/node_modules/commander/Readme.md +0 -1157
  269. package/node_modules/commander/esm.mjs +0 -16
  270. package/node_modules/commander/index.js +0 -24
  271. package/node_modules/commander/lib/argument.js +0 -149
  272. package/node_modules/commander/lib/command.js +0 -2509
  273. package/node_modules/commander/lib/error.js +0 -39
  274. package/node_modules/commander/lib/help.js +0 -520
  275. package/node_modules/commander/lib/option.js +0 -330
  276. package/node_modules/commander/lib/suggestSimilar.js +0 -101
  277. package/node_modules/commander/package-support.json +0 -16
  278. package/node_modules/commander/package.json +0 -84
  279. package/node_modules/commander/typings/esm.d.mts +0 -3
  280. package/node_modules/commander/typings/index.d.ts +0 -969
  281. package/node_modules/node-forge/.editorconfig +0 -17
  282. package/node_modules/node-forge/.eslintrc.js +0 -24
  283. package/node_modules/node-forge/.github/workflows/main.yaml +0 -96
  284. package/node_modules/node-forge/.istanbul.yml +0 -2
  285. package/node_modules/node-forge/.npmignore +0 -15
  286. package/node_modules/node-forge/CHANGELOG.md +0 -555
  287. package/node_modules/node-forge/CONTRIBUTING.md +0 -18
  288. package/node_modules/node-forge/LICENSE +0 -331
  289. package/node_modules/node-forge/README.md +0 -2071
  290. package/node_modules/node-forge/RELEASE.md +0 -19
  291. package/node_modules/node-forge/SECURITY.md +0 -5
  292. package/node_modules/node-forge/examples/create-cert.js +0 -110
  293. package/node_modules/node-forge/examples/create-csr.js +0 -66
  294. package/node_modules/node-forge/examples/create-pkcs12.js +0 -160
  295. package/node_modules/node-forge/examples/imap.js +0 -46
  296. package/node_modules/node-forge/examples/sign-p7.js +0 -115
  297. package/node_modules/node-forge/examples/tls.js +0 -189
  298. package/node_modules/node-forge/flash/PooledSocket.as +0 -18
  299. package/node_modules/node-forge/flash/README.md +0 -48
  300. package/node_modules/node-forge/flash/SocketEvent.as +0 -36
  301. package/node_modules/node-forge/flash/SocketPool.as +0 -754
  302. package/node_modules/node-forge/flash/mod_fsp/README +0 -135
  303. package/node_modules/node-forge/flash/mod_fsp/mod_fsp.c +0 -415
  304. package/node_modules/node-forge/flash/package.json +0 -28
  305. package/node_modules/node-forge/flash/policyserver.js +0 -65
  306. package/node_modules/node-forge/flash/policyserver.py +0 -112
  307. package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  308. package/node_modules/node-forge/karma-sauce.conf.js +0 -79
  309. package/node_modules/node-forge/karma.conf.js +0 -133
  310. package/node_modules/node-forge/lib/aes.js +0 -1091
  311. package/node_modules/node-forge/lib/aesCipherSuites.js +0 -282
  312. package/node_modules/node-forge/lib/asn1-validator.js +0 -91
  313. package/node_modules/node-forge/lib/asn1.js +0 -1503
  314. package/node_modules/node-forge/lib/baseN.js +0 -186
  315. package/node_modules/node-forge/lib/cipher.js +0 -230
  316. package/node_modules/node-forge/lib/cipherModes.js +0 -999
  317. package/node_modules/node-forge/lib/des.js +0 -496
  318. package/node_modules/node-forge/lib/ed25519.js +0 -1091
  319. package/node_modules/node-forge/lib/forge.js +0 -13
  320. package/node_modules/node-forge/lib/form.js +0 -149
  321. package/node_modules/node-forge/lib/hmac.js +0 -146
  322. package/node_modules/node-forge/lib/http.js +0 -1346
  323. package/node_modules/node-forge/lib/index.all.js +0 -16
  324. package/node_modules/node-forge/lib/index.js +0 -33
  325. package/node_modules/node-forge/lib/jsbn.js +0 -1294
  326. package/node_modules/node-forge/lib/kem.js +0 -168
  327. package/node_modules/node-forge/lib/log.js +0 -319
  328. package/node_modules/node-forge/lib/md.all.js +0 -13
  329. package/node_modules/node-forge/lib/md.js +0 -11
  330. package/node_modules/node-forge/lib/md5.js +0 -289
  331. package/node_modules/node-forge/lib/mgf.js +0 -12
  332. package/node_modules/node-forge/lib/mgf1.js +0 -57
  333. package/node_modules/node-forge/lib/oids.js +0 -180
  334. package/node_modules/node-forge/lib/pbe.js +0 -1023
  335. package/node_modules/node-forge/lib/pbkdf2.js +0 -211
  336. package/node_modules/node-forge/lib/pem.js +0 -237
  337. package/node_modules/node-forge/lib/pkcs1.js +0 -276
  338. package/node_modules/node-forge/lib/pkcs12.js +0 -1078
  339. package/node_modules/node-forge/lib/pkcs7.js +0 -1260
  340. package/node_modules/node-forge/lib/pkcs7asn1.js +0 -410
  341. package/node_modules/node-forge/lib/pki.js +0 -102
  342. package/node_modules/node-forge/lib/prime.js +0 -297
  343. package/node_modules/node-forge/lib/prime.worker.js +0 -168
  344. package/node_modules/node-forge/lib/prng.js +0 -419
  345. package/node_modules/node-forge/lib/pss.js +0 -241
  346. package/node_modules/node-forge/lib/random.js +0 -191
  347. package/node_modules/node-forge/lib/rc2.js +0 -410
  348. package/node_modules/node-forge/lib/rsa.js +0 -1973
  349. package/node_modules/node-forge/lib/sha1.js +0 -319
  350. package/node_modules/node-forge/lib/sha256.js +0 -327
  351. package/node_modules/node-forge/lib/sha512.js +0 -561
  352. package/node_modules/node-forge/lib/socket.js +0 -287
  353. package/node_modules/node-forge/lib/ssh.js +0 -236
  354. package/node_modules/node-forge/lib/tls.js +0 -4282
  355. package/node_modules/node-forge/lib/tlssocket.js +0 -249
  356. package/node_modules/node-forge/lib/util.js +0 -2652
  357. package/node_modules/node-forge/lib/x509.js +0 -3251
  358. package/node_modules/node-forge/lib/xhr.js +0 -738
  359. package/node_modules/node-forge/package.json +0 -123
  360. package/node_modules/node-forge/tests/.eslintrc.js +0 -5
  361. package/node_modules/node-forge/tests/README.md +0 -4
  362. package/node_modules/node-forge/tests/benchmarks/aes-speed.js +0 -62
  363. package/node_modules/node-forge/tests/benchmarks/so-44303784.js +0 -246
  364. package/node_modules/node-forge/tests/flash/README.md +0 -7
  365. package/node_modules/node-forge/tests/flash/Test.as +0 -96
  366. package/node_modules/node-forge/tests/flash/build-flash.xml +0 -7
  367. package/node_modules/node-forge/tests/flash/index.html +0 -28
  368. package/node_modules/node-forge/tests/index.html +0 -33
  369. package/node_modules/node-forge/tests/issues/heartbleed.js +0 -55
  370. package/node_modules/node-forge/tests/issues/issue-428.html +0 -95
  371. package/node_modules/node-forge/tests/issues/issue-428.js +0 -375
  372. package/node_modules/node-forge/tests/karma/index.js +0 -8
  373. package/node_modules/node-forge/tests/karma/testWorker.js +0 -65
  374. package/node_modules/node-forge/tests/karma/web-worker-rsa.js +0 -55
  375. package/node_modules/node-forge/tests/legacy/common.html +0 -65
  376. package/node_modules/node-forge/tests/legacy/common.js +0 -2199
  377. package/node_modules/node-forge/tests/legacy/form.html +0 -148
  378. package/node_modules/node-forge/tests/legacy/form.js +0 -40
  379. package/node_modules/node-forge/tests/legacy/http.html +0 -235
  380. package/node_modules/node-forge/tests/legacy/index.html +0 -70
  381. package/node_modules/node-forge/tests/legacy/keygen.html +0 -113
  382. package/node_modules/node-forge/tests/legacy/login.css +0 -26
  383. package/node_modules/node-forge/tests/legacy/loginDemo.html +0 -32
  384. package/node_modules/node-forge/tests/legacy/loginDemo.js +0 -149
  385. package/node_modules/node-forge/tests/legacy/performance.html +0 -533
  386. package/node_modules/node-forge/tests/legacy/result.txt +0 -1
  387. package/node_modules/node-forge/tests/legacy/socketPool.html +0 -302
  388. package/node_modules/node-forge/tests/legacy/tasks.html +0 -54
  389. package/node_modules/node-forge/tests/legacy/tasks.js +0 -378
  390. package/node_modules/node-forge/tests/legacy/tls.html +0 -389
  391. package/node_modules/node-forge/tests/legacy/webid.html +0 -89
  392. package/node_modules/node-forge/tests/legacy/webid.js +0 -313
  393. package/node_modules/node-forge/tests/legacy/ws-webid.js +0 -120
  394. package/node_modules/node-forge/tests/legacy/xhr.html +0 -67
  395. package/node_modules/node-forge/tests/legacy/xhr.js +0 -590
  396. package/node_modules/node-forge/tests/pocs/ghsa-2328-f5f3-gj25.js +0 -85
  397. package/node_modules/node-forge/tests/pocs/ghsa-ppp5-5v6c-4jwp.js +0 -166
  398. package/node_modules/node-forge/tests/pocs/ghsa-q67f-28xg-22rw.js +0 -103
  399. package/node_modules/node-forge/tests/security/cve-2025-12816.js +0 -75
  400. package/node_modules/node-forge/tests/security/ghsa-554w-wpv2-vw27.js +0 -81
  401. package/node_modules/node-forge/tests/security/index.js +0 -3
  402. package/node_modules/node-forge/tests/server.crt +0 -26
  403. package/node_modules/node-forge/tests/server.js +0 -87
  404. package/node_modules/node-forge/tests/server.key +0 -27
  405. package/node_modules/node-forge/tests/support/task.js +0 -718
  406. package/node_modules/node-forge/tests/tests.css +0 -61
  407. package/node_modules/node-forge/tests/unit/aes.js +0 -1498
  408. package/node_modules/node-forge/tests/unit/asn1.js +0 -1337
  409. package/node_modules/node-forge/tests/unit/csr.js +0 -129
  410. package/node_modules/node-forge/tests/unit/des.js +0 -231
  411. package/node_modules/node-forge/tests/unit/ed25519.js +0 -395
  412. package/node_modules/node-forge/tests/unit/forge.js +0 -2
  413. package/node_modules/node-forge/tests/unit/hmac.js +0 -64
  414. package/node_modules/node-forge/tests/unit/index.html +0 -20
  415. package/node_modules/node-forge/tests/unit/index.js +0 -27
  416. package/node_modules/node-forge/tests/unit/jsbn.js +0 -40
  417. package/node_modules/node-forge/tests/unit/kem.js +0 -167
  418. package/node_modules/node-forge/tests/unit/md5.js +0 -114
  419. package/node_modules/node-forge/tests/unit/mgf1.js +0 -16
  420. package/node_modules/node-forge/tests/unit/pbkdf2.js +0 -182
  421. package/node_modules/node-forge/tests/unit/pem.js +0 -159
  422. package/node_modules/node-forge/tests/unit/pkcs1.js +0 -1077
  423. package/node_modules/node-forge/tests/unit/pkcs12.js +0 -739
  424. package/node_modules/node-forge/tests/unit/pkcs7.js +0 -792
  425. package/node_modules/node-forge/tests/unit/random.js +0 -48
  426. package/node_modules/node-forge/tests/unit/rc2.js +0 -88
  427. package/node_modules/node-forge/tests/unit/rsa.js +0 -1278
  428. package/node_modules/node-forge/tests/unit/sha1.js +0 -72
  429. package/node_modules/node-forge/tests/unit/sha256.js +0 -79
  430. package/node_modules/node-forge/tests/unit/sha512.js +0 -200
  431. package/node_modules/node-forge/tests/unit/ssh.js +0 -175
  432. package/node_modules/node-forge/tests/unit/tls.js +0 -175
  433. package/node_modules/node-forge/tests/unit/util.js +0 -595
  434. package/node_modules/node-forge/tests/unit/x509.js +0 -1986
  435. package/node_modules/node-forge/tests/websockets/server-webid.js +0 -495
  436. package/node_modules/node-forge/tests/websockets/server-ws.js +0 -158
  437. package/node_modules/node-forge/webpack-tests.config.js +0 -26
  438. package/node_modules/node-forge/webpack.config.js +0 -130
  439. package/node_modules/zod/LICENSE +0 -21
  440. package/node_modules/zod/README.md +0 -208
  441. package/node_modules/zod/index.cjs +0 -33
  442. package/node_modules/zod/index.d.cts +0 -4
  443. package/node_modules/zod/index.d.ts +0 -4
  444. package/node_modules/zod/index.js +0 -4
  445. package/node_modules/zod/package.json +0 -118
  446. package/node_modules/zod/src/index.ts +0 -4
  447. package/node_modules/zod/src/v3/ZodError.ts +0 -330
  448. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  449. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  450. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  451. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  452. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  453. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  454. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  455. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  456. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  457. package/node_modules/zod/src/v3/errors.ts +0 -13
  458. package/node_modules/zod/src/v3/external.ts +0 -6
  459. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  460. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  461. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  462. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  463. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  464. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  465. package/node_modules/zod/src/v3/index.ts +0 -4
  466. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  467. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  468. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  469. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  470. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  471. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  472. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  473. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  474. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  475. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  476. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  477. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  478. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  479. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
  480. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  481. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  482. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  483. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  484. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  485. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  486. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  487. package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  488. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  489. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  490. package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
  491. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  492. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  493. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  494. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  495. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  496. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  497. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  498. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  499. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  500. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
  501. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  502. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  503. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  504. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  505. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  506. package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  507. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  508. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  509. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  510. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  511. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  512. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  513. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  514. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  515. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  516. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  517. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  518. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  519. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  520. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  521. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  522. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  523. package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  524. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  525. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  526. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  527. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  528. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  529. package/node_modules/zod/src/v3/types.ts +0 -5136
  530. package/node_modules/zod/src/v4/classic/checks.ts +0 -30
  531. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  532. package/node_modules/zod/src/v4/classic/compat.ts +0 -66
  533. package/node_modules/zod/src/v4/classic/errors.ts +0 -75
  534. package/node_modules/zod/src/v4/classic/external.ts +0 -50
  535. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  536. package/node_modules/zod/src/v4/classic/iso.ts +0 -90
  537. package/node_modules/zod/src/v4/classic/parse.ts +0 -33
  538. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
  539. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  540. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  541. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
  542. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  543. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  544. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  545. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  546. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
  547. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
  548. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  549. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  550. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
  551. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  552. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
  553. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
  554. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
  555. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  556. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
  557. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  558. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
  559. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  560. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
  561. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
  562. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
  563. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  564. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
  565. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
  566. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
  567. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
  568. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  569. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
  570. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
  571. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  572. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  573. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
  574. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  575. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
  576. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
  577. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
  578. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
  579. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
  580. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
  581. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
  582. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
  583. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  584. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  585. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  586. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  587. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
  588. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
  589. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
  590. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
  591. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
  592. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
  593. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
  594. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
  595. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
  596. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
  597. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
  598. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
  599. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
  600. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
  601. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  602. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  603. package/node_modules/zod/src/v4/core/api.ts +0 -1594
  604. package/node_modules/zod/src/v4/core/checks.ts +0 -1283
  605. package/node_modules/zod/src/v4/core/config.ts +0 -15
  606. package/node_modules/zod/src/v4/core/core.ts +0 -134
  607. package/node_modules/zod/src/v4/core/doc.ts +0 -44
  608. package/node_modules/zod/src/v4/core/errors.ts +0 -424
  609. package/node_modules/zod/src/v4/core/function.ts +0 -176
  610. package/node_modules/zod/src/v4/core/index.ts +0 -15
  611. package/node_modules/zod/src/v4/core/json-schema.ts +0 -143
  612. package/node_modules/zod/src/v4/core/parse.ts +0 -94
  613. package/node_modules/zod/src/v4/core/regexes.ts +0 -135
  614. package/node_modules/zod/src/v4/core/registries.ts +0 -96
  615. package/node_modules/zod/src/v4/core/schemas.ts +0 -3842
  616. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
  617. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  618. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  619. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  620. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  621. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  622. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
  623. package/node_modules/zod/src/v4/core/util.ts +0 -775
  624. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  625. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  626. package/node_modules/zod/src/v4/index.ts +0 -4
  627. package/node_modules/zod/src/v4/locales/ar.ts +0 -125
  628. package/node_modules/zod/src/v4/locales/az.ts +0 -121
  629. package/node_modules/zod/src/v4/locales/be.ts +0 -184
  630. package/node_modules/zod/src/v4/locales/ca.ts +0 -127
  631. package/node_modules/zod/src/v4/locales/cs.ts +0 -142
  632. package/node_modules/zod/src/v4/locales/de.ts +0 -124
  633. package/node_modules/zod/src/v4/locales/en.ts +0 -127
  634. package/node_modules/zod/src/v4/locales/eo.ts +0 -125
  635. package/node_modules/zod/src/v4/locales/es.ts +0 -125
  636. package/node_modules/zod/src/v4/locales/fa.ts +0 -134
  637. package/node_modules/zod/src/v4/locales/fi.ts +0 -131
  638. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
  639. package/node_modules/zod/src/v4/locales/fr.ts +0 -124
  640. package/node_modules/zod/src/v4/locales/he.ts +0 -125
  641. package/node_modules/zod/src/v4/locales/hu.ts +0 -126
  642. package/node_modules/zod/src/v4/locales/id.ts +0 -125
  643. package/node_modules/zod/src/v4/locales/index.ts +0 -39
  644. package/node_modules/zod/src/v4/locales/it.ts +0 -125
  645. package/node_modules/zod/src/v4/locales/ja.ts +0 -122
  646. package/node_modules/zod/src/v4/locales/kh.ts +0 -126
  647. package/node_modules/zod/src/v4/locales/ko.ts +0 -131
  648. package/node_modules/zod/src/v4/locales/mk.ts +0 -127
  649. package/node_modules/zod/src/v4/locales/ms.ts +0 -124
  650. package/node_modules/zod/src/v4/locales/nl.ts +0 -126
  651. package/node_modules/zod/src/v4/locales/no.ts +0 -124
  652. package/node_modules/zod/src/v4/locales/ota.ts +0 -125
  653. package/node_modules/zod/src/v4/locales/pl.ts +0 -126
  654. package/node_modules/zod/src/v4/locales/ps.ts +0 -133
  655. package/node_modules/zod/src/v4/locales/pt.ts +0 -123
  656. package/node_modules/zod/src/v4/locales/ru.ts +0 -184
  657. package/node_modules/zod/src/v4/locales/sl.ts +0 -126
  658. package/node_modules/zod/src/v4/locales/sv.ts +0 -127
  659. package/node_modules/zod/src/v4/locales/ta.ts +0 -125
  660. package/node_modules/zod/src/v4/locales/th.ts +0 -126
  661. package/node_modules/zod/src/v4/locales/tr.ts +0 -121
  662. package/node_modules/zod/src/v4/locales/ua.ts +0 -126
  663. package/node_modules/zod/src/v4/locales/ur.ts +0 -126
  664. package/node_modules/zod/src/v4/locales/vi.ts +0 -125
  665. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
  666. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
  667. package/node_modules/zod/src/v4/mini/checks.ts +0 -32
  668. package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
  669. package/node_modules/zod/src/v4/mini/external.ts +0 -40
  670. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  671. package/node_modules/zod/src/v4/mini/iso.ts +0 -62
  672. package/node_modules/zod/src/v4/mini/parse.ts +0 -1
  673. package/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
  674. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  675. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
  676. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  677. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  678. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  679. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
  680. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
  681. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  682. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
  683. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  684. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
  685. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
  686. package/node_modules/zod/src/v4-mini/index.ts +0 -1
  687. package/node_modules/zod/v3/ZodError.cjs +0 -138
  688. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  689. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  690. package/node_modules/zod/v3/ZodError.js +0 -133
  691. package/node_modules/zod/v3/errors.cjs +0 -17
  692. package/node_modules/zod/v3/errors.d.cts +0 -5
  693. package/node_modules/zod/v3/errors.d.ts +0 -5
  694. package/node_modules/zod/v3/errors.js +0 -9
  695. package/node_modules/zod/v3/external.cjs +0 -22
  696. package/node_modules/zod/v3/external.d.cts +0 -6
  697. package/node_modules/zod/v3/external.d.ts +0 -6
  698. package/node_modules/zod/v3/external.js +0 -6
  699. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  700. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  701. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  702. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  703. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  704. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  705. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  706. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  707. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  708. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  709. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  710. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  711. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  712. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  713. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  714. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  715. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  716. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  717. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  718. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  719. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  720. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  721. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  722. package/node_modules/zod/v3/helpers/util.js +0 -133
  723. package/node_modules/zod/v3/index.cjs +0 -33
  724. package/node_modules/zod/v3/index.d.cts +0 -4
  725. package/node_modules/zod/v3/index.d.ts +0 -4
  726. package/node_modules/zod/v3/index.js +0 -4
  727. package/node_modules/zod/v3/locales/en.cjs +0 -111
  728. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  729. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  730. package/node_modules/zod/v3/locales/en.js +0 -109
  731. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  732. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  733. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  734. package/node_modules/zod/v3/standard-schema.js +0 -1
  735. package/node_modules/zod/v3/types.cjs +0 -3775
  736. package/node_modules/zod/v3/types.d.cts +0 -1031
  737. package/node_modules/zod/v3/types.d.ts +0 -1031
  738. package/node_modules/zod/v3/types.js +0 -3693
  739. package/node_modules/zod/v4/classic/checks.cjs +0 -32
  740. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  741. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  742. package/node_modules/zod/v4/classic/checks.js +0 -1
  743. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  744. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  745. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  746. package/node_modules/zod/v4/classic/coerce.js +0 -17
  747. package/node_modules/zod/v4/classic/compat.cjs +0 -57
  748. package/node_modules/zod/v4/classic/compat.d.cts +0 -46
  749. package/node_modules/zod/v4/classic/compat.d.ts +0 -46
  750. package/node_modules/zod/v4/classic/compat.js +0 -27
  751. package/node_modules/zod/v4/classic/errors.cjs +0 -67
  752. package/node_modules/zod/v4/classic/errors.d.cts +0 -30
  753. package/node_modules/zod/v4/classic/errors.d.ts +0 -30
  754. package/node_modules/zod/v4/classic/errors.js +0 -41
  755. package/node_modules/zod/v4/classic/external.cjs +0 -70
  756. package/node_modules/zod/v4/classic/external.d.cts +0 -13
  757. package/node_modules/zod/v4/classic/external.d.ts +0 -13
  758. package/node_modules/zod/v4/classic/external.js +0 -18
  759. package/node_modules/zod/v4/classic/index.cjs +0 -33
  760. package/node_modules/zod/v4/classic/index.d.cts +0 -4
  761. package/node_modules/zod/v4/classic/index.d.ts +0 -4
  762. package/node_modules/zod/v4/classic/index.js +0 -4
  763. package/node_modules/zod/v4/classic/iso.cjs +0 -60
  764. package/node_modules/zod/v4/classic/iso.d.cts +0 -22
  765. package/node_modules/zod/v4/classic/iso.d.ts +0 -22
  766. package/node_modules/zod/v4/classic/iso.js +0 -30
  767. package/node_modules/zod/v4/classic/parse.cjs +0 -32
  768. package/node_modules/zod/v4/classic/parse.d.cts +0 -23
  769. package/node_modules/zod/v4/classic/parse.d.ts +0 -23
  770. package/node_modules/zod/v4/classic/parse.js +0 -6
  771. package/node_modules/zod/v4/classic/schemas.cjs +0 -1109
  772. package/node_modules/zod/v4/classic/schemas.d.cts +0 -630
  773. package/node_modules/zod/v4/classic/schemas.d.ts +0 -630
  774. package/node_modules/zod/v4/classic/schemas.js +0 -1006
  775. package/node_modules/zod/v4/core/api.cjs +0 -1039
  776. package/node_modules/zod/v4/core/api.d.cts +0 -284
  777. package/node_modules/zod/v4/core/api.d.ts +0 -284
  778. package/node_modules/zod/v4/core/api.js +0 -906
  779. package/node_modules/zod/v4/core/checks.cjs +0 -591
  780. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  781. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  782. package/node_modules/zod/v4/core/checks.js +0 -565
  783. package/node_modules/zod/v4/core/core.cjs +0 -67
  784. package/node_modules/zod/v4/core/core.d.cts +0 -49
  785. package/node_modules/zod/v4/core/core.d.ts +0 -49
  786. package/node_modules/zod/v4/core/core.js +0 -61
  787. package/node_modules/zod/v4/core/doc.cjs +0 -39
  788. package/node_modules/zod/v4/core/doc.d.cts +0 -14
  789. package/node_modules/zod/v4/core/doc.d.ts +0 -14
  790. package/node_modules/zod/v4/core/doc.js +0 -35
  791. package/node_modules/zod/v4/core/errors.cjs +0 -226
  792. package/node_modules/zod/v4/core/errors.d.cts +0 -208
  793. package/node_modules/zod/v4/core/errors.d.ts +0 -208
  794. package/node_modules/zod/v4/core/errors.js +0 -195
  795. package/node_modules/zod/v4/core/function.cjs +0 -102
  796. package/node_modules/zod/v4/core/function.d.cts +0 -52
  797. package/node_modules/zod/v4/core/function.d.ts +0 -52
  798. package/node_modules/zod/v4/core/function.js +0 -75
  799. package/node_modules/zod/v4/core/index.cjs +0 -44
  800. package/node_modules/zod/v4/core/index.d.cts +0 -15
  801. package/node_modules/zod/v4/core/index.d.ts +0 -15
  802. package/node_modules/zod/v4/core/index.js +0 -15
  803. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  804. package/node_modules/zod/v4/core/json-schema.d.cts +0 -87
  805. package/node_modules/zod/v4/core/json-schema.d.ts +0 -87
  806. package/node_modules/zod/v4/core/json-schema.js +0 -1
  807. package/node_modules/zod/v4/core/parse.cjs +0 -87
  808. package/node_modules/zod/v4/core/parse.d.cts +0 -25
  809. package/node_modules/zod/v4/core/parse.d.ts +0 -25
  810. package/node_modules/zod/v4/core/parse.js +0 -57
  811. package/node_modules/zod/v4/core/regexes.cjs +0 -103
  812. package/node_modules/zod/v4/core/regexes.d.cts +0 -62
  813. package/node_modules/zod/v4/core/regexes.d.ts +0 -62
  814. package/node_modules/zod/v4/core/regexes.js +0 -95
  815. package/node_modules/zod/v4/core/registries.cjs +0 -56
  816. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  817. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  818. package/node_modules/zod/v4/core/registries.js +0 -51
  819. package/node_modules/zod/v4/core/schemas.cjs +0 -1748
  820. package/node_modules/zod/v4/core/schemas.d.cts +0 -1041
  821. package/node_modules/zod/v4/core/schemas.d.ts +0 -1041
  822. package/node_modules/zod/v4/core/schemas.js +0 -1717
  823. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  824. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
  825. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
  826. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  827. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
  828. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
  829. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
  830. package/node_modules/zod/v4/core/to-json-schema.js +0 -849
  831. package/node_modules/zod/v4/core/util.cjs +0 -539
  832. package/node_modules/zod/v4/core/util.d.cts +0 -183
  833. package/node_modules/zod/v4/core/util.d.ts +0 -183
  834. package/node_modules/zod/v4/core/util.js +0 -493
  835. package/node_modules/zod/v4/core/versions.cjs +0 -8
  836. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  837. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  838. package/node_modules/zod/v4/core/versions.js +0 -5
  839. package/node_modules/zod/v4/index.cjs +0 -22
  840. package/node_modules/zod/v4/index.d.cts +0 -3
  841. package/node_modules/zod/v4/index.d.ts +0 -3
  842. package/node_modules/zod/v4/index.js +0 -3
  843. package/node_modules/zod/v4/locales/ar.cjs +0 -142
  844. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  845. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  846. package/node_modules/zod/v4/locales/ar.js +0 -116
  847. package/node_modules/zod/v4/locales/az.cjs +0 -141
  848. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  849. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  850. package/node_modules/zod/v4/locales/az.js +0 -115
  851. package/node_modules/zod/v4/locales/be.cjs +0 -190
  852. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  853. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  854. package/node_modules/zod/v4/locales/be.js +0 -164
  855. package/node_modules/zod/v4/locales/ca.cjs +0 -144
  856. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  857. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  858. package/node_modules/zod/v4/locales/ca.js +0 -118
  859. package/node_modules/zod/v4/locales/cs.cjs +0 -161
  860. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  861. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  862. package/node_modules/zod/v4/locales/cs.js +0 -135
  863. package/node_modules/zod/v4/locales/de.cjs +0 -142
  864. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  865. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  866. package/node_modules/zod/v4/locales/de.js +0 -116
  867. package/node_modules/zod/v4/locales/en.cjs +0 -145
  868. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  869. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  870. package/node_modules/zod/v4/locales/en.js +0 -117
  871. package/node_modules/zod/v4/locales/eo.cjs +0 -144
  872. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  873. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  874. package/node_modules/zod/v4/locales/eo.js +0 -116
  875. package/node_modules/zod/v4/locales/es.cjs +0 -143
  876. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  877. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  878. package/node_modules/zod/v4/locales/es.js +0 -117
  879. package/node_modules/zod/v4/locales/fa.cjs +0 -148
  880. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  881. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  882. package/node_modules/zod/v4/locales/fa.js +0 -122
  883. package/node_modules/zod/v4/locales/fi.cjs +0 -148
  884. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  885. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  886. package/node_modules/zod/v4/locales/fi.js +0 -122
  887. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
  888. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  889. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  890. package/node_modules/zod/v4/locales/fr-CA.js +0 -117
  891. package/node_modules/zod/v4/locales/fr.cjs +0 -142
  892. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  893. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  894. package/node_modules/zod/v4/locales/fr.js +0 -116
  895. package/node_modules/zod/v4/locales/he.cjs +0 -143
  896. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  897. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  898. package/node_modules/zod/v4/locales/he.js +0 -117
  899. package/node_modules/zod/v4/locales/hu.cjs +0 -143
  900. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  901. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  902. package/node_modules/zod/v4/locales/hu.js +0 -117
  903. package/node_modules/zod/v4/locales/id.cjs +0 -142
  904. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  905. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  906. package/node_modules/zod/v4/locales/id.js +0 -116
  907. package/node_modules/zod/v4/locales/index.cjs +0 -84
  908. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  909. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  910. package/node_modules/zod/v4/locales/index.js +0 -39
  911. package/node_modules/zod/v4/locales/it.cjs +0 -143
  912. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  913. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  914. package/node_modules/zod/v4/locales/it.js +0 -117
  915. package/node_modules/zod/v4/locales/ja.cjs +0 -141
  916. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  917. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  918. package/node_modules/zod/v4/locales/ja.js +0 -115
  919. package/node_modules/zod/v4/locales/kh.cjs +0 -143
  920. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  921. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  922. package/node_modules/zod/v4/locales/kh.js +0 -117
  923. package/node_modules/zod/v4/locales/ko.cjs +0 -147
  924. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  925. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  926. package/node_modules/zod/v4/locales/ko.js +0 -121
  927. package/node_modules/zod/v4/locales/mk.cjs +0 -144
  928. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  929. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  930. package/node_modules/zod/v4/locales/mk.js +0 -118
  931. package/node_modules/zod/v4/locales/ms.cjs +0 -142
  932. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  933. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  934. package/node_modules/zod/v4/locales/ms.js +0 -116
  935. package/node_modules/zod/v4/locales/nl.cjs +0 -143
  936. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  937. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  938. package/node_modules/zod/v4/locales/nl.js +0 -117
  939. package/node_modules/zod/v4/locales/no.cjs +0 -142
  940. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  941. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  942. package/node_modules/zod/v4/locales/no.js +0 -116
  943. package/node_modules/zod/v4/locales/ota.cjs +0 -143
  944. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  945. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  946. package/node_modules/zod/v4/locales/ota.js +0 -117
  947. package/node_modules/zod/v4/locales/pl.cjs +0 -143
  948. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  949. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  950. package/node_modules/zod/v4/locales/pl.js +0 -117
  951. package/node_modules/zod/v4/locales/ps.cjs +0 -148
  952. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  953. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  954. package/node_modules/zod/v4/locales/ps.js +0 -122
  955. package/node_modules/zod/v4/locales/pt.cjs +0 -142
  956. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  957. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  958. package/node_modules/zod/v4/locales/pt.js +0 -116
  959. package/node_modules/zod/v4/locales/ru.cjs +0 -190
  960. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  961. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  962. package/node_modules/zod/v4/locales/ru.js +0 -164
  963. package/node_modules/zod/v4/locales/sl.cjs +0 -143
  964. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  965. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  966. package/node_modules/zod/v4/locales/sl.js +0 -117
  967. package/node_modules/zod/v4/locales/sv.cjs +0 -144
  968. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  969. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  970. package/node_modules/zod/v4/locales/sv.js +0 -118
  971. package/node_modules/zod/v4/locales/ta.cjs +0 -143
  972. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  973. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  974. package/node_modules/zod/v4/locales/ta.js +0 -117
  975. package/node_modules/zod/v4/locales/th.cjs +0 -143
  976. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  977. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  978. package/node_modules/zod/v4/locales/th.js +0 -117
  979. package/node_modules/zod/v4/locales/tr.cjs +0 -143
  980. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  981. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  982. package/node_modules/zod/v4/locales/tr.js +0 -115
  983. package/node_modules/zod/v4/locales/ua.cjs +0 -143
  984. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  985. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  986. package/node_modules/zod/v4/locales/ua.js +0 -117
  987. package/node_modules/zod/v4/locales/ur.cjs +0 -143
  988. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  989. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  990. package/node_modules/zod/v4/locales/ur.js +0 -117
  991. package/node_modules/zod/v4/locales/vi.cjs +0 -142
  992. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  993. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  994. package/node_modules/zod/v4/locales/vi.js +0 -116
  995. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
  996. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  997. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  998. package/node_modules/zod/v4/locales/zh-CN.js +0 -116
  999. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
  1000. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  1001. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  1002. package/node_modules/zod/v4/locales/zh-TW.js +0 -117
  1003. package/node_modules/zod/v4/mini/checks.cjs +0 -34
  1004. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  1005. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  1006. package/node_modules/zod/v4/mini/checks.js +0 -1
  1007. package/node_modules/zod/v4/mini/coerce.cjs +0 -47
  1008. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  1009. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  1010. package/node_modules/zod/v4/mini/coerce.js +0 -17
  1011. package/node_modules/zod/v4/mini/external.cjs +0 -62
  1012. package/node_modules/zod/v4/mini/external.d.cts +0 -11
  1013. package/node_modules/zod/v4/mini/external.d.ts +0 -11
  1014. package/node_modules/zod/v4/mini/external.js +0 -13
  1015. package/node_modules/zod/v4/mini/index.cjs +0 -32
  1016. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  1017. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  1018. package/node_modules/zod/v4/mini/index.js +0 -3
  1019. package/node_modules/zod/v4/mini/iso.cjs +0 -60
  1020. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  1021. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  1022. package/node_modules/zod/v4/mini/iso.js +0 -30
  1023. package/node_modules/zod/v4/mini/parse.cjs +0 -8
  1024. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  1025. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  1026. package/node_modules/zod/v4/mini/parse.js +0 -1
  1027. package/node_modules/zod/v4/mini/schemas.cjs +0 -839
  1028. package/node_modules/zod/v4/mini/schemas.d.cts +0 -356
  1029. package/node_modules/zod/v4/mini/schemas.d.ts +0 -356
  1030. package/node_modules/zod/v4/mini/schemas.js +0 -732
  1031. package/node_modules/zod/v4-mini/index.cjs +0 -17
  1032. package/node_modules/zod/v4-mini/index.d.cts +0 -1
  1033. package/node_modules/zod/v4-mini/index.d.ts +0 -1
  1034. package/node_modules/zod/v4-mini/index.js +0 -1
@@ -1,1091 +0,0 @@
1
- /**
2
- * Advanced Encryption Standard (AES) implementation.
3
- *
4
- * This implementation is based on the public domain library 'jscrypto' which
5
- * was written by:
6
- *
7
- * Emily Stark (estark@stanford.edu)
8
- * Mike Hamburg (mhamburg@stanford.edu)
9
- * Dan Boneh (dabo@cs.stanford.edu)
10
- *
11
- * Parts of this code are based on the OpenSSL implementation of AES:
12
- * http://www.openssl.org
13
- *
14
- * @author Dave Longley
15
- *
16
- * Copyright (c) 2010-2014 Digital Bazaar, Inc.
17
- */
18
- var forge = require('./forge');
19
- require('./cipher');
20
- require('./cipherModes');
21
- require('./util');
22
-
23
- /* AES API */
24
- module.exports = forge.aes = forge.aes || {};
25
-
26
- /**
27
- * Deprecated. Instead, use:
28
- *
29
- * var cipher = forge.cipher.createCipher('AES-<mode>', key);
30
- * cipher.start({iv: iv});
31
- *
32
- * Creates an AES cipher object to encrypt data using the given symmetric key.
33
- * The output will be stored in the 'output' member of the returned cipher.
34
- *
35
- * The key and iv may be given as a string of bytes, an array of bytes,
36
- * a byte buffer, or an array of 32-bit words.
37
- *
38
- * @param key the symmetric key to use.
39
- * @param iv the initialization vector to use.
40
- * @param output the buffer to write to, null to create one.
41
- * @param mode the cipher mode to use (default: 'CBC').
42
- *
43
- * @return the cipher.
44
- */
45
- forge.aes.startEncrypting = function(key, iv, output, mode) {
46
- var cipher = _createCipher({
47
- key: key,
48
- output: output,
49
- decrypt: false,
50
- mode: mode
51
- });
52
- cipher.start(iv);
53
- return cipher;
54
- };
55
-
56
- /**
57
- * Deprecated. Instead, use:
58
- *
59
- * var cipher = forge.cipher.createCipher('AES-<mode>', key);
60
- *
61
- * Creates an AES cipher object to encrypt data using the given symmetric key.
62
- *
63
- * The key may be given as a string of bytes, an array of bytes, a
64
- * byte buffer, or an array of 32-bit words.
65
- *
66
- * @param key the symmetric key to use.
67
- * @param mode the cipher mode to use (default: 'CBC').
68
- *
69
- * @return the cipher.
70
- */
71
- forge.aes.createEncryptionCipher = function(key, mode) {
72
- return _createCipher({
73
- key: key,
74
- output: null,
75
- decrypt: false,
76
- mode: mode
77
- });
78
- };
79
-
80
- /**
81
- * Deprecated. Instead, use:
82
- *
83
- * var decipher = forge.cipher.createDecipher('AES-<mode>', key);
84
- * decipher.start({iv: iv});
85
- *
86
- * Creates an AES cipher object to decrypt data using the given symmetric key.
87
- * The output will be stored in the 'output' member of the returned cipher.
88
- *
89
- * The key and iv may be given as a string of bytes, an array of bytes,
90
- * a byte buffer, or an array of 32-bit words.
91
- *
92
- * @param key the symmetric key to use.
93
- * @param iv the initialization vector to use.
94
- * @param output the buffer to write to, null to create one.
95
- * @param mode the cipher mode to use (default: 'CBC').
96
- *
97
- * @return the cipher.
98
- */
99
- forge.aes.startDecrypting = function(key, iv, output, mode) {
100
- var cipher = _createCipher({
101
- key: key,
102
- output: output,
103
- decrypt: true,
104
- mode: mode
105
- });
106
- cipher.start(iv);
107
- return cipher;
108
- };
109
-
110
- /**
111
- * Deprecated. Instead, use:
112
- *
113
- * var decipher = forge.cipher.createDecipher('AES-<mode>', key);
114
- *
115
- * Creates an AES cipher object to decrypt data using the given symmetric key.
116
- *
117
- * The key may be given as a string of bytes, an array of bytes, a
118
- * byte buffer, or an array of 32-bit words.
119
- *
120
- * @param key the symmetric key to use.
121
- * @param mode the cipher mode to use (default: 'CBC').
122
- *
123
- * @return the cipher.
124
- */
125
- forge.aes.createDecryptionCipher = function(key, mode) {
126
- return _createCipher({
127
- key: key,
128
- output: null,
129
- decrypt: true,
130
- mode: mode
131
- });
132
- };
133
-
134
- /**
135
- * Creates a new AES cipher algorithm object.
136
- *
137
- * @param name the name of the algorithm.
138
- * @param mode the mode factory function.
139
- *
140
- * @return the AES algorithm object.
141
- */
142
- forge.aes.Algorithm = function(name, mode) {
143
- if(!init) {
144
- initialize();
145
- }
146
- var self = this;
147
- self.name = name;
148
- self.mode = new mode({
149
- blockSize: 16,
150
- cipher: {
151
- encrypt: function(inBlock, outBlock) {
152
- return _updateBlock(self._w, inBlock, outBlock, false);
153
- },
154
- decrypt: function(inBlock, outBlock) {
155
- return _updateBlock(self._w, inBlock, outBlock, true);
156
- }
157
- }
158
- });
159
- self._init = false;
160
- };
161
-
162
- /**
163
- * Initializes this AES algorithm by expanding its key.
164
- *
165
- * @param options the options to use.
166
- * key the key to use with this algorithm.
167
- * decrypt true if the algorithm should be initialized for decryption,
168
- * false for encryption.
169
- */
170
- forge.aes.Algorithm.prototype.initialize = function(options) {
171
- if(this._init) {
172
- return;
173
- }
174
-
175
- var key = options.key;
176
- var tmp;
177
-
178
- /* Note: The key may be a string of bytes, an array of bytes, a byte
179
- buffer, or an array of 32-bit integers. If the key is in bytes, then
180
- it must be 16, 24, or 32 bytes in length. If it is in 32-bit
181
- integers, it must be 4, 6, or 8 integers long. */
182
-
183
- if(typeof key === 'string' &&
184
- (key.length === 16 || key.length === 24 || key.length === 32)) {
185
- // convert key string into byte buffer
186
- key = forge.util.createBuffer(key);
187
- } else if(forge.util.isArray(key) &&
188
- (key.length === 16 || key.length === 24 || key.length === 32)) {
189
- // convert key integer array into byte buffer
190
- tmp = key;
191
- key = forge.util.createBuffer();
192
- for(var i = 0; i < tmp.length; ++i) {
193
- key.putByte(tmp[i]);
194
- }
195
- }
196
-
197
- // convert key byte buffer into 32-bit integer array
198
- if(!forge.util.isArray(key)) {
199
- tmp = key;
200
- key = [];
201
-
202
- // key lengths of 16, 24, 32 bytes allowed
203
- var len = tmp.length();
204
- if(len === 16 || len === 24 || len === 32) {
205
- len = len >>> 2;
206
- for(var i = 0; i < len; ++i) {
207
- key.push(tmp.getInt32());
208
- }
209
- }
210
- }
211
-
212
- // key must be an array of 32-bit integers by now
213
- if(!forge.util.isArray(key) ||
214
- !(key.length === 4 || key.length === 6 || key.length === 8)) {
215
- throw new Error('Invalid key parameter.');
216
- }
217
-
218
- // encryption operation is always used for these modes
219
- var mode = this.mode.name;
220
- var encryptOp = (['CFB', 'OFB', 'CTR', 'GCM'].indexOf(mode) !== -1);
221
-
222
- // do key expansion
223
- this._w = _expandKey(key, options.decrypt && !encryptOp);
224
- this._init = true;
225
- };
226
-
227
- /**
228
- * Expands a key. Typically only used for testing.
229
- *
230
- * @param key the symmetric key to expand, as an array of 32-bit words.
231
- * @param decrypt true to expand for decryption, false for encryption.
232
- *
233
- * @return the expanded key.
234
- */
235
- forge.aes._expandKey = function(key, decrypt) {
236
- if(!init) {
237
- initialize();
238
- }
239
- return _expandKey(key, decrypt);
240
- };
241
-
242
- /**
243
- * Updates a single block. Typically only used for testing.
244
- *
245
- * @param w the expanded key to use.
246
- * @param input an array of block-size 32-bit words.
247
- * @param output an array of block-size 32-bit words.
248
- * @param decrypt true to decrypt, false to encrypt.
249
- */
250
- forge.aes._updateBlock = _updateBlock;
251
-
252
- /** Register AES algorithms **/
253
-
254
- registerAlgorithm('AES-ECB', forge.cipher.modes.ecb);
255
- registerAlgorithm('AES-CBC', forge.cipher.modes.cbc);
256
- registerAlgorithm('AES-CFB', forge.cipher.modes.cfb);
257
- registerAlgorithm('AES-OFB', forge.cipher.modes.ofb);
258
- registerAlgorithm('AES-CTR', forge.cipher.modes.ctr);
259
- registerAlgorithm('AES-GCM', forge.cipher.modes.gcm);
260
-
261
- function registerAlgorithm(name, mode) {
262
- var factory = function() {
263
- return new forge.aes.Algorithm(name, mode);
264
- };
265
- forge.cipher.registerAlgorithm(name, factory);
266
- }
267
-
268
- /** AES implementation **/
269
-
270
- var init = false; // not yet initialized
271
- var Nb = 4; // number of words comprising the state (AES = 4)
272
- var sbox; // non-linear substitution table used in key expansion
273
- var isbox; // inversion of sbox
274
- var rcon; // round constant word array
275
- var mix; // mix-columns table
276
- var imix; // inverse mix-columns table
277
-
278
- /**
279
- * Performs initialization, ie: precomputes tables to optimize for speed.
280
- *
281
- * One way to understand how AES works is to imagine that 'addition' and
282
- * 'multiplication' are interfaces that require certain mathematical
283
- * properties to hold true (ie: they are associative) but they might have
284
- * different implementations and produce different kinds of results ...
285
- * provided that their mathematical properties remain true. AES defines
286
- * its own methods of addition and multiplication but keeps some important
287
- * properties the same, ie: associativity and distributivity. The
288
- * explanation below tries to shed some light on how AES defines addition
289
- * and multiplication of bytes and 32-bit words in order to perform its
290
- * encryption and decryption algorithms.
291
- *
292
- * The basics:
293
- *
294
- * The AES algorithm views bytes as binary representations of polynomials
295
- * that have either 1 or 0 as the coefficients. It defines the addition
296
- * or subtraction of two bytes as the XOR operation. It also defines the
297
- * multiplication of two bytes as a finite field referred to as GF(2^8)
298
- * (Note: 'GF' means "Galois Field" which is a field that contains a finite
299
- * number of elements so GF(2^8) has 256 elements).
300
- *
301
- * This means that any two bytes can be represented as binary polynomials;
302
- * when they multiplied together and modularly reduced by an irreducible
303
- * polynomial of the 8th degree, the results are the field GF(2^8). The
304
- * specific irreducible polynomial that AES uses in hexadecimal is 0x11b.
305
- * This multiplication is associative with 0x01 as the identity:
306
- *
307
- * (b * 0x01 = GF(b, 0x01) = b).
308
- *
309
- * The operation GF(b, 0x02) can be performed at the byte level by left
310
- * shifting b once and then XOR'ing it (to perform the modular reduction)
311
- * with 0x11b if b is >= 128. Repeated application of the multiplication
312
- * of 0x02 can be used to implement the multiplication of any two bytes.
313
- *
314
- * For instance, multiplying 0x57 and 0x13, denoted as GF(0x57, 0x13), can
315
- * be performed by factoring 0x13 into 0x01, 0x02, and 0x10. Then these
316
- * factors can each be multiplied by 0x57 and then added together. To do
317
- * the multiplication, values for 0x57 multiplied by each of these 3 factors
318
- * can be precomputed and stored in a table. To add them, the values from
319
- * the table are XOR'd together.
320
- *
321
- * AES also defines addition and multiplication of words, that is 4-byte
322
- * numbers represented as polynomials of 3 degrees where the coefficients
323
- * are the values of the bytes.
324
- *
325
- * The word [a0, a1, a2, a3] is a polynomial a3x^3 + a2x^2 + a1x + a0.
326
- *
327
- * Addition is performed by XOR'ing like powers of x. Multiplication
328
- * is performed in two steps, the first is an algebraic expansion as
329
- * you would do normally (where addition is XOR). But the result is
330
- * a polynomial larger than 3 degrees and thus it cannot fit in a word. So
331
- * next the result is modularly reduced by an AES-specific polynomial of
332
- * degree 4 which will always produce a polynomial of less than 4 degrees
333
- * such that it will fit in a word. In AES, this polynomial is x^4 + 1.
334
- *
335
- * The modular product of two polynomials 'a' and 'b' is thus:
336
- *
337
- * d(x) = d3x^3 + d2x^2 + d1x + d0
338
- * with
339
- * d0 = GF(a0, b0) ^ GF(a3, b1) ^ GF(a2, b2) ^ GF(a1, b3)
340
- * d1 = GF(a1, b0) ^ GF(a0, b1) ^ GF(a3, b2) ^ GF(a2, b3)
341
- * d2 = GF(a2, b0) ^ GF(a1, b1) ^ GF(a0, b2) ^ GF(a3, b3)
342
- * d3 = GF(a3, b0) ^ GF(a2, b1) ^ GF(a1, b2) ^ GF(a0, b3)
343
- *
344
- * As a matrix:
345
- *
346
- * [d0] = [a0 a3 a2 a1][b0]
347
- * [d1] [a1 a0 a3 a2][b1]
348
- * [d2] [a2 a1 a0 a3][b2]
349
- * [d3] [a3 a2 a1 a0][b3]
350
- *
351
- * Special polynomials defined by AES (0x02 == {02}):
352
- * a(x) = {03}x^3 + {01}x^2 + {01}x + {02}
353
- * a^-1(x) = {0b}x^3 + {0d}x^2 + {09}x + {0e}.
354
- *
355
- * These polynomials are used in the MixColumns() and InverseMixColumns()
356
- * operations, respectively, to cause each element in the state to affect
357
- * the output (referred to as diffusing).
358
- *
359
- * RotWord() uses: a0 = a1 = a2 = {00} and a3 = {01}, which is the
360
- * polynomial x3.
361
- *
362
- * The ShiftRows() method modifies the last 3 rows in the state (where
363
- * the state is 4 words with 4 bytes per word) by shifting bytes cyclically.
364
- * The 1st byte in the second row is moved to the end of the row. The 1st
365
- * and 2nd bytes in the third row are moved to the end of the row. The 1st,
366
- * 2nd, and 3rd bytes are moved in the fourth row.
367
- *
368
- * More details on how AES arithmetic works:
369
- *
370
- * In the polynomial representation of binary numbers, XOR performs addition
371
- * and subtraction and multiplication in GF(2^8) denoted as GF(a, b)
372
- * corresponds with the multiplication of polynomials modulo an irreducible
373
- * polynomial of degree 8. In other words, for AES, GF(a, b) will multiply
374
- * polynomial 'a' with polynomial 'b' and then do a modular reduction by
375
- * an AES-specific irreducible polynomial of degree 8.
376
- *
377
- * A polynomial is irreducible if its only divisors are one and itself. For
378
- * the AES algorithm, this irreducible polynomial is:
379
- *
380
- * m(x) = x^8 + x^4 + x^3 + x + 1,
381
- *
382
- * or {01}{1b} in hexadecimal notation, where each coefficient is a bit:
383
- * 100011011 = 283 = 0x11b.
384
- *
385
- * For example, GF(0x57, 0x83) = 0xc1 because
386
- *
387
- * 0x57 = 87 = 01010111 = x^6 + x^4 + x^2 + x + 1
388
- * 0x85 = 131 = 10000101 = x^7 + x + 1
389
- *
390
- * (x^6 + x^4 + x^2 + x + 1) * (x^7 + x + 1)
391
- * = x^13 + x^11 + x^9 + x^8 + x^7 +
392
- * x^7 + x^5 + x^3 + x^2 + x +
393
- * x^6 + x^4 + x^2 + x + 1
394
- * = x^13 + x^11 + x^9 + x^8 + x^6 + x^5 + x^4 + x^3 + 1 = y
395
- * y modulo (x^8 + x^4 + x^3 + x + 1)
396
- * = x^7 + x^6 + 1.
397
- *
398
- * The modular reduction by m(x) guarantees the result will be a binary
399
- * polynomial of less than degree 8, so that it can fit in a byte.
400
- *
401
- * The operation to multiply a binary polynomial b with x (the polynomial
402
- * x in binary representation is 00000010) is:
403
- *
404
- * b_7x^8 + b_6x^7 + b_5x^6 + b_4x^5 + b_3x^4 + b_2x^3 + b_1x^2 + b_0x^1
405
- *
406
- * To get GF(b, x) we must reduce that by m(x). If b_7 is 0 (that is the
407
- * most significant bit is 0 in b) then the result is already reduced. If
408
- * it is 1, then we can reduce it by subtracting m(x) via an XOR.
409
- *
410
- * It follows that multiplication by x (00000010 or 0x02) can be implemented
411
- * by performing a left shift followed by a conditional bitwise XOR with
412
- * 0x1b. This operation on bytes is denoted by xtime(). Multiplication by
413
- * higher powers of x can be implemented by repeated application of xtime().
414
- *
415
- * By adding intermediate results, multiplication by any constant can be
416
- * implemented. For instance:
417
- *
418
- * GF(0x57, 0x13) = 0xfe because:
419
- *
420
- * xtime(b) = (b & 128) ? (b << 1 ^ 0x11b) : (b << 1)
421
- *
422
- * Note: We XOR with 0x11b instead of 0x1b because in javascript our
423
- * datatype for b can be larger than 1 byte, so a left shift will not
424
- * automatically eliminate bits that overflow a byte ... by XOR'ing the
425
- * overflow bit with 1 (the extra one from 0x11b) we zero it out.
426
- *
427
- * GF(0x57, 0x02) = xtime(0x57) = 0xae
428
- * GF(0x57, 0x04) = xtime(0xae) = 0x47
429
- * GF(0x57, 0x08) = xtime(0x47) = 0x8e
430
- * GF(0x57, 0x10) = xtime(0x8e) = 0x07
431
- *
432
- * GF(0x57, 0x13) = GF(0x57, (0x01 ^ 0x02 ^ 0x10))
433
- *
434
- * And by the distributive property (since XOR is addition and GF() is
435
- * multiplication):
436
- *
437
- * = GF(0x57, 0x01) ^ GF(0x57, 0x02) ^ GF(0x57, 0x10)
438
- * = 0x57 ^ 0xae ^ 0x07
439
- * = 0xfe.
440
- */
441
- function initialize() {
442
- init = true;
443
-
444
- /* Populate the Rcon table. These are the values given by
445
- [x^(i-1),{00},{00},{00}] where x^(i-1) are powers of x (and x = 0x02)
446
- in the field of GF(2^8), where i starts at 1.
447
-
448
- rcon[0] = [0x00, 0x00, 0x00, 0x00]
449
- rcon[1] = [0x01, 0x00, 0x00, 0x00] 2^(1-1) = 2^0 = 1
450
- rcon[2] = [0x02, 0x00, 0x00, 0x00] 2^(2-1) = 2^1 = 2
451
- ...
452
- rcon[9] = [0x1B, 0x00, 0x00, 0x00] 2^(9-1) = 2^8 = 0x1B
453
- rcon[10] = [0x36, 0x00, 0x00, 0x00] 2^(10-1) = 2^9 = 0x36
454
-
455
- We only store the first byte because it is the only one used.
456
- */
457
- rcon = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36];
458
-
459
- // compute xtime table which maps i onto GF(i, 0x02)
460
- var xtime = new Array(256);
461
- for(var i = 0; i < 128; ++i) {
462
- xtime[i] = i << 1;
463
- xtime[i + 128] = (i + 128) << 1 ^ 0x11B;
464
- }
465
-
466
- // compute all other tables
467
- sbox = new Array(256);
468
- isbox = new Array(256);
469
- mix = new Array(4);
470
- imix = new Array(4);
471
- for(var i = 0; i < 4; ++i) {
472
- mix[i] = new Array(256);
473
- imix[i] = new Array(256);
474
- }
475
- var e = 0, ei = 0, e2, e4, e8, sx, sx2, me, ime;
476
- for(var i = 0; i < 256; ++i) {
477
- /* We need to generate the SubBytes() sbox and isbox tables so that
478
- we can perform byte substitutions. This requires us to traverse
479
- all of the elements in GF, find their multiplicative inverses,
480
- and apply to each the following affine transformation:
481
-
482
- bi' = bi ^ b(i + 4) mod 8 ^ b(i + 5) mod 8 ^ b(i + 6) mod 8 ^
483
- b(i + 7) mod 8 ^ ci
484
- for 0 <= i < 8, where bi is the ith bit of the byte, and ci is the
485
- ith bit of a byte c with the value {63} or {01100011}.
486
-
487
- It is possible to traverse every possible value in a Galois field
488
- using what is referred to as a 'generator'. There are many
489
- generators (128 out of 256): 3,5,6,9,11,82 to name a few. To fully
490
- traverse GF we iterate 255 times, multiplying by our generator
491
- each time.
492
-
493
- On each iteration we can determine the multiplicative inverse for
494
- the current element.
495
-
496
- Suppose there is an element in GF 'e'. For a given generator 'g',
497
- e = g^x. The multiplicative inverse of e is g^(255 - x). It turns
498
- out that if use the inverse of a generator as another generator
499
- it will produce all of the corresponding multiplicative inverses
500
- at the same time. For this reason, we choose 5 as our inverse
501
- generator because it only requires 2 multiplies and 1 add and its
502
- inverse, 82, requires relatively few operations as well.
503
-
504
- In order to apply the affine transformation, the multiplicative
505
- inverse 'ei' of 'e' can be repeatedly XOR'd (4 times) with a
506
- bit-cycling of 'ei'. To do this 'ei' is first stored in 's' and
507
- 'x'. Then 's' is left shifted and the high bit of 's' is made the
508
- low bit. The resulting value is stored in 's'. Then 'x' is XOR'd
509
- with 's' and stored in 'x'. On each subsequent iteration the same
510
- operation is performed. When 4 iterations are complete, 'x' is
511
- XOR'd with 'c' (0x63) and the transformed value is stored in 'x'.
512
- For example:
513
-
514
- s = 01000001
515
- x = 01000001
516
-
517
- iteration 1: s = 10000010, x ^= s
518
- iteration 2: s = 00000101, x ^= s
519
- iteration 3: s = 00001010, x ^= s
520
- iteration 4: s = 00010100, x ^= s
521
- x ^= 0x63
522
-
523
- This can be done with a loop where s = (s << 1) | (s >> 7). However,
524
- it can also be done by using a single 16-bit (in this case 32-bit)
525
- number 'sx'. Since XOR is an associative operation, we can set 'sx'
526
- to 'ei' and then XOR it with 'sx' left-shifted 1,2,3, and 4 times.
527
- The most significant bits will flow into the high 8 bit positions
528
- and be correctly XOR'd with one another. All that remains will be
529
- to cycle the high 8 bits by XOR'ing them all with the lower 8 bits
530
- afterwards.
531
-
532
- At the same time we're populating sbox and isbox we can precompute
533
- the multiplication we'll need to do to do MixColumns() later.
534
- */
535
-
536
- // apply affine transformation
537
- sx = ei ^ (ei << 1) ^ (ei << 2) ^ (ei << 3) ^ (ei << 4);
538
- sx = (sx >> 8) ^ (sx & 255) ^ 0x63;
539
-
540
- // update tables
541
- sbox[e] = sx;
542
- isbox[sx] = e;
543
-
544
- /* Mixing columns is done using matrix multiplication. The columns
545
- that are to be mixed are each a single word in the current state.
546
- The state has Nb columns (4 columns). Therefore each column is a
547
- 4 byte word. So to mix the columns in a single column 'c' where
548
- its rows are r0, r1, r2, and r3, we use the following matrix
549
- multiplication:
550
-
551
- [2 3 1 1]*[r0,c]=[r'0,c]
552
- [1 2 3 1] [r1,c] [r'1,c]
553
- [1 1 2 3] [r2,c] [r'2,c]
554
- [3 1 1 2] [r3,c] [r'3,c]
555
-
556
- r0, r1, r2, and r3 are each 1 byte of one of the words in the
557
- state (a column). To do matrix multiplication for each mixed
558
- column c' we multiply the corresponding row from the left matrix
559
- with the corresponding column from the right matrix. In total, we
560
- get 4 equations:
561
-
562
- r0,c' = 2*r0,c + 3*r1,c + 1*r2,c + 1*r3,c
563
- r1,c' = 1*r0,c + 2*r1,c + 3*r2,c + 1*r3,c
564
- r2,c' = 1*r0,c + 1*r1,c + 2*r2,c + 3*r3,c
565
- r3,c' = 3*r0,c + 1*r1,c + 1*r2,c + 2*r3,c
566
-
567
- As usual, the multiplication is as previously defined and the
568
- addition is XOR. In order to optimize mixing columns we can store
569
- the multiplication results in tables. If you think of the whole
570
- column as a word (it might help to visualize by mentally rotating
571
- the equations above by counterclockwise 90 degrees) then you can
572
- see that it would be useful to map the multiplications performed on
573
- each byte (r0, r1, r2, r3) onto a word as well. For instance, we
574
- could map 2*r0,1*r0,1*r0,3*r0 onto a word by storing 2*r0 in the
575
- highest 8 bits and 3*r0 in the lowest 8 bits (with the other two
576
- respectively in the middle). This means that a table can be
577
- constructed that uses r0 as an index to the word. We can do the
578
- same with r1, r2, and r3, creating a total of 4 tables.
579
-
580
- To construct a full c', we can just look up each byte of c in
581
- their respective tables and XOR the results together.
582
-
583
- Also, to build each table we only have to calculate the word
584
- for 2,1,1,3 for every byte ... which we can do on each iteration
585
- of this loop since we will iterate over every byte. After we have
586
- calculated 2,1,1,3 we can get the results for the other tables
587
- by cycling the byte at the end to the beginning. For instance
588
- we can take the result of table 2,1,1,3 and produce table 3,2,1,1
589
- by moving the right most byte to the left most position just like
590
- how you can imagine the 3 moved out of 2,1,1,3 and to the front
591
- to produce 3,2,1,1.
592
-
593
- There is another optimization in that the same multiples of
594
- the current element we need in order to advance our generator
595
- to the next iteration can be reused in performing the 2,1,1,3
596
- calculation. We also calculate the inverse mix column tables,
597
- with e,9,d,b being the inverse of 2,1,1,3.
598
-
599
- When we're done, and we need to actually mix columns, the first
600
- byte of each state word should be put through mix[0] (2,1,1,3),
601
- the second through mix[1] (3,2,1,1) and so forth. Then they should
602
- be XOR'd together to produce the fully mixed column.
603
- */
604
-
605
- // calculate mix and imix table values
606
- sx2 = xtime[sx];
607
- e2 = xtime[e];
608
- e4 = xtime[e2];
609
- e8 = xtime[e4];
610
- me =
611
- (sx2 << 24) ^ // 2
612
- (sx << 16) ^ // 1
613
- (sx << 8) ^ // 1
614
- (sx ^ sx2); // 3
615
- ime =
616
- (e2 ^ e4 ^ e8) << 24 ^ // E (14)
617
- (e ^ e8) << 16 ^ // 9
618
- (e ^ e4 ^ e8) << 8 ^ // D (13)
619
- (e ^ e2 ^ e8); // B (11)
620
- // produce each of the mix tables by rotating the 2,1,1,3 value
621
- for(var n = 0; n < 4; ++n) {
622
- mix[n][e] = me;
623
- imix[n][sx] = ime;
624
- // cycle the right most byte to the left most position
625
- // ie: 2,1,1,3 becomes 3,2,1,1
626
- me = me << 24 | me >>> 8;
627
- ime = ime << 24 | ime >>> 8;
628
- }
629
-
630
- // get next element and inverse
631
- if(e === 0) {
632
- // 1 is the inverse of 1
633
- e = ei = 1;
634
- } else {
635
- // e = 2e + 2*2*2*(10e)) = multiply e by 82 (chosen generator)
636
- // ei = ei + 2*2*ei = multiply ei by 5 (inverse generator)
637
- e = e2 ^ xtime[xtime[xtime[e2 ^ e8]]];
638
- ei ^= xtime[xtime[ei]];
639
- }
640
- }
641
- }
642
-
643
- /**
644
- * Generates a key schedule using the AES key expansion algorithm.
645
- *
646
- * The AES algorithm takes the Cipher Key, K, and performs a Key Expansion
647
- * routine to generate a key schedule. The Key Expansion generates a total
648
- * of Nb*(Nr + 1) words: the algorithm requires an initial set of Nb words,
649
- * and each of the Nr rounds requires Nb words of key data. The resulting
650
- * key schedule consists of a linear array of 4-byte words, denoted [wi ],
651
- * with i in the range 0 <= i < Nb(Nr + 1).
652
- *
653
- * KeyExpansion(byte key[4*Nk], word w[Nb*(Nr+1)], Nk)
654
- * AES-128 (Nb=4, Nk=4, Nr=10)
655
- * AES-192 (Nb=4, Nk=6, Nr=12)
656
- * AES-256 (Nb=4, Nk=8, Nr=14)
657
- * Note: Nr=Nk+6.
658
- *
659
- * Nb is the number of columns (32-bit words) comprising the State (or
660
- * number of bytes in a block). For AES, Nb=4.
661
- *
662
- * @param key the key to schedule (as an array of 32-bit words).
663
- * @param decrypt true to modify the key schedule to decrypt, false not to.
664
- *
665
- * @return the generated key schedule.
666
- */
667
- function _expandKey(key, decrypt) {
668
- // copy the key's words to initialize the key schedule
669
- var w = key.slice(0);
670
-
671
- /* RotWord() will rotate a word, moving the first byte to the last
672
- byte's position (shifting the other bytes left).
673
-
674
- We will be getting the value of Rcon at i / Nk. 'i' will iterate
675
- from Nk to (Nb * Nr+1). Nk = 4 (4 byte key), Nb = 4 (4 words in
676
- a block), Nr = Nk + 6 (10). Therefore 'i' will iterate from
677
- 4 to 44 (exclusive). Each time we iterate 4 times, i / Nk will
678
- increase by 1. We use a counter iNk to keep track of this.
679
- */
680
-
681
- // go through the rounds expanding the key
682
- var temp, iNk = 1;
683
- var Nk = w.length;
684
- var Nr1 = Nk + 6 + 1;
685
- var end = Nb * Nr1;
686
- for(var i = Nk; i < end; ++i) {
687
- temp = w[i - 1];
688
- if(i % Nk === 0) {
689
- // temp = SubWord(RotWord(temp)) ^ Rcon[i / Nk]
690
- temp =
691
- sbox[temp >>> 16 & 255] << 24 ^
692
- sbox[temp >>> 8 & 255] << 16 ^
693
- sbox[temp & 255] << 8 ^
694
- sbox[temp >>> 24] ^ (rcon[iNk] << 24);
695
- iNk++;
696
- } else if(Nk > 6 && (i % Nk === 4)) {
697
- // temp = SubWord(temp)
698
- temp =
699
- sbox[temp >>> 24] << 24 ^
700
- sbox[temp >>> 16 & 255] << 16 ^
701
- sbox[temp >>> 8 & 255] << 8 ^
702
- sbox[temp & 255];
703
- }
704
- w[i] = w[i - Nk] ^ temp;
705
- }
706
-
707
- /* When we are updating a cipher block we always use the code path for
708
- encryption whether we are decrypting or not (to shorten code and
709
- simplify the generation of look up tables). However, because there
710
- are differences in the decryption algorithm, other than just swapping
711
- in different look up tables, we must transform our key schedule to
712
- account for these changes:
713
-
714
- 1. The decryption algorithm gets its key rounds in reverse order.
715
- 2. The decryption algorithm adds the round key before mixing columns
716
- instead of afterwards.
717
-
718
- We don't need to modify our key schedule to handle the first case,
719
- we can just traverse the key schedule in reverse order when decrypting.
720
-
721
- The second case requires a little work.
722
-
723
- The tables we built for performing rounds will take an input and then
724
- perform SubBytes() and MixColumns() or, for the decrypt version,
725
- InvSubBytes() and InvMixColumns(). But the decrypt algorithm requires
726
- us to AddRoundKey() before InvMixColumns(). This means we'll need to
727
- apply some transformations to the round key to inverse-mix its columns
728
- so they'll be correct for moving AddRoundKey() to after the state has
729
- had its columns inverse-mixed.
730
-
731
- To inverse-mix the columns of the state when we're decrypting we use a
732
- lookup table that will apply InvSubBytes() and InvMixColumns() at the
733
- same time. However, the round key's bytes are not inverse-substituted
734
- in the decryption algorithm. To get around this problem, we can first
735
- substitute the bytes in the round key so that when we apply the
736
- transformation via the InvSubBytes()+InvMixColumns() table, it will
737
- undo our substitution leaving us with the original value that we
738
- want -- and then inverse-mix that value.
739
-
740
- This change will correctly alter our key schedule so that we can XOR
741
- each round key with our already transformed decryption state. This
742
- allows us to use the same code path as the encryption algorithm.
743
-
744
- We make one more change to the decryption key. Since the decryption
745
- algorithm runs in reverse from the encryption algorithm, we reverse
746
- the order of the round keys to avoid having to iterate over the key
747
- schedule backwards when running the encryption algorithm later in
748
- decryption mode. In addition to reversing the order of the round keys,
749
- we also swap each round key's 2nd and 4th rows. See the comments
750
- section where rounds are performed for more details about why this is
751
- done. These changes are done inline with the other substitution
752
- described above.
753
- */
754
- if(decrypt) {
755
- var tmp;
756
- var m0 = imix[0];
757
- var m1 = imix[1];
758
- var m2 = imix[2];
759
- var m3 = imix[3];
760
- var wnew = w.slice(0);
761
- end = w.length;
762
- for(var i = 0, wi = end - Nb; i < end; i += Nb, wi -= Nb) {
763
- // do not sub the first or last round key (round keys are Nb
764
- // words) as no column mixing is performed before they are added,
765
- // but do change the key order
766
- if(i === 0 || i === (end - Nb)) {
767
- wnew[i] = w[wi];
768
- wnew[i + 1] = w[wi + 3];
769
- wnew[i + 2] = w[wi + 2];
770
- wnew[i + 3] = w[wi + 1];
771
- } else {
772
- // substitute each round key byte because the inverse-mix
773
- // table will inverse-substitute it (effectively cancel the
774
- // substitution because round key bytes aren't sub'd in
775
- // decryption mode) and swap indexes 3 and 1
776
- for(var n = 0; n < Nb; ++n) {
777
- tmp = w[wi + n];
778
- wnew[i + (3&-n)] =
779
- m0[sbox[tmp >>> 24]] ^
780
- m1[sbox[tmp >>> 16 & 255]] ^
781
- m2[sbox[tmp >>> 8 & 255]] ^
782
- m3[sbox[tmp & 255]];
783
- }
784
- }
785
- }
786
- w = wnew;
787
- }
788
-
789
- return w;
790
- }
791
-
792
- /**
793
- * Updates a single block (16 bytes) using AES. The update will either
794
- * encrypt or decrypt the block.
795
- *
796
- * @param w the key schedule.
797
- * @param input the input block (an array of 32-bit words).
798
- * @param output the updated output block.
799
- * @param decrypt true to decrypt the block, false to encrypt it.
800
- */
801
- function _updateBlock(w, input, output, decrypt) {
802
- /*
803
- Cipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)])
804
- begin
805
- byte state[4,Nb]
806
- state = in
807
- AddRoundKey(state, w[0, Nb-1])
808
- for round = 1 step 1 to Nr-1
809
- SubBytes(state)
810
- ShiftRows(state)
811
- MixColumns(state)
812
- AddRoundKey(state, w[round*Nb, (round+1)*Nb-1])
813
- end for
814
- SubBytes(state)
815
- ShiftRows(state)
816
- AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])
817
- out = state
818
- end
819
-
820
- InvCipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)])
821
- begin
822
- byte state[4,Nb]
823
- state = in
824
- AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])
825
- for round = Nr-1 step -1 downto 1
826
- InvShiftRows(state)
827
- InvSubBytes(state)
828
- AddRoundKey(state, w[round*Nb, (round+1)*Nb-1])
829
- InvMixColumns(state)
830
- end for
831
- InvShiftRows(state)
832
- InvSubBytes(state)
833
- AddRoundKey(state, w[0, Nb-1])
834
- out = state
835
- end
836
- */
837
-
838
- // Encrypt: AddRoundKey(state, w[0, Nb-1])
839
- // Decrypt: AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])
840
- var Nr = w.length / 4 - 1;
841
- var m0, m1, m2, m3, sub;
842
- if(decrypt) {
843
- m0 = imix[0];
844
- m1 = imix[1];
845
- m2 = imix[2];
846
- m3 = imix[3];
847
- sub = isbox;
848
- } else {
849
- m0 = mix[0];
850
- m1 = mix[1];
851
- m2 = mix[2];
852
- m3 = mix[3];
853
- sub = sbox;
854
- }
855
- var a, b, c, d, a2, b2, c2;
856
- a = input[0] ^ w[0];
857
- b = input[decrypt ? 3 : 1] ^ w[1];
858
- c = input[2] ^ w[2];
859
- d = input[decrypt ? 1 : 3] ^ w[3];
860
- var i = 3;
861
-
862
- /* In order to share code we follow the encryption algorithm when both
863
- encrypting and decrypting. To account for the changes required in the
864
- decryption algorithm, we use different lookup tables when decrypting
865
- and use a modified key schedule to account for the difference in the
866
- order of transformations applied when performing rounds. We also get
867
- key rounds in reverse order (relative to encryption). */
868
- for(var round = 1; round < Nr; ++round) {
869
- /* As described above, we'll be using table lookups to perform the
870
- column mixing. Each column is stored as a word in the state (the
871
- array 'input' has one column as a word at each index). In order to
872
- mix a column, we perform these transformations on each row in c,
873
- which is 1 byte in each word. The new column for c0 is c'0:
874
-
875
- m0 m1 m2 m3
876
- r0,c'0 = 2*r0,c0 + 3*r1,c0 + 1*r2,c0 + 1*r3,c0
877
- r1,c'0 = 1*r0,c0 + 2*r1,c0 + 3*r2,c0 + 1*r3,c0
878
- r2,c'0 = 1*r0,c0 + 1*r1,c0 + 2*r2,c0 + 3*r3,c0
879
- r3,c'0 = 3*r0,c0 + 1*r1,c0 + 1*r2,c0 + 2*r3,c0
880
-
881
- So using mix tables where c0 is a word with r0 being its upper
882
- 8 bits and r3 being its lower 8 bits:
883
-
884
- m0[c0 >> 24] will yield this word: [2*r0,1*r0,1*r0,3*r0]
885
- ...
886
- m3[c0 & 255] will yield this word: [1*r3,1*r3,3*r3,2*r3]
887
-
888
- Therefore to mix the columns in each word in the state we
889
- do the following (& 255 omitted for brevity):
890
- c'0,r0 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]
891
- c'0,r1 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]
892
- c'0,r2 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]
893
- c'0,r3 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3]
894
-
895
- However, before mixing, the algorithm requires us to perform
896
- ShiftRows(). The ShiftRows() transformation cyclically shifts the
897
- last 3 rows of the state over different offsets. The first row
898
- (r = 0) is not shifted.
899
-
900
- s'_r,c = s_r,(c + shift(r, Nb) mod Nb
901
- for 0 < r < 4 and 0 <= c < Nb and
902
- shift(1, 4) = 1
903
- shift(2, 4) = 2
904
- shift(3, 4) = 3.
905
-
906
- This causes the first byte in r = 1 to be moved to the end of
907
- the row, the first 2 bytes in r = 2 to be moved to the end of
908
- the row, the first 3 bytes in r = 3 to be moved to the end of
909
- the row:
910
-
911
- r1: [c0 c1 c2 c3] => [c1 c2 c3 c0]
912
- r2: [c0 c1 c2 c3] [c2 c3 c0 c1]
913
- r3: [c0 c1 c2 c3] [c3 c0 c1 c2]
914
-
915
- We can make these substitutions inline with our column mixing to
916
- generate an updated set of equations to produce each word in the
917
- state (note the columns have changed positions):
918
-
919
- c0 c1 c2 c3 => c0 c1 c2 c3
920
- c0 c1 c2 c3 c1 c2 c3 c0 (cycled 1 byte)
921
- c0 c1 c2 c3 c2 c3 c0 c1 (cycled 2 bytes)
922
- c0 c1 c2 c3 c3 c0 c1 c2 (cycled 3 bytes)
923
-
924
- Therefore:
925
-
926
- c'0 = 2*r0,c0 + 3*r1,c1 + 1*r2,c2 + 1*r3,c3
927
- c'0 = 1*r0,c0 + 2*r1,c1 + 3*r2,c2 + 1*r3,c3
928
- c'0 = 1*r0,c0 + 1*r1,c1 + 2*r2,c2 + 3*r3,c3
929
- c'0 = 3*r0,c0 + 1*r1,c1 + 1*r2,c2 + 2*r3,c3
930
-
931
- c'1 = 2*r0,c1 + 3*r1,c2 + 1*r2,c3 + 1*r3,c0
932
- c'1 = 1*r0,c1 + 2*r1,c2 + 3*r2,c3 + 1*r3,c0
933
- c'1 = 1*r0,c1 + 1*r1,c2 + 2*r2,c3 + 3*r3,c0
934
- c'1 = 3*r0,c1 + 1*r1,c2 + 1*r2,c3 + 2*r3,c0
935
-
936
- ... and so forth for c'2 and c'3. The important distinction is
937
- that the columns are cycling, with c0 being used with the m0
938
- map when calculating c0, but c1 being used with the m0 map when
939
- calculating c1 ... and so forth.
940
-
941
- When performing the inverse we transform the mirror image and
942
- skip the bottom row, instead of the top one, and move upwards:
943
-
944
- c3 c2 c1 c0 => c0 c3 c2 c1 (cycled 3 bytes) *same as encryption
945
- c3 c2 c1 c0 c1 c0 c3 c2 (cycled 2 bytes)
946
- c3 c2 c1 c0 c2 c1 c0 c3 (cycled 1 byte) *same as encryption
947
- c3 c2 c1 c0 c3 c2 c1 c0
948
-
949
- If you compare the resulting matrices for ShiftRows()+MixColumns()
950
- and for InvShiftRows()+InvMixColumns() the 2nd and 4th columns are
951
- different (in encrypt mode vs. decrypt mode). So in order to use
952
- the same code to handle both encryption and decryption, we will
953
- need to do some mapping.
954
-
955
- If in encryption mode we let a=c0, b=c1, c=c2, d=c3, and r<N> be
956
- a row number in the state, then the resulting matrix in encryption
957
- mode for applying the above transformations would be:
958
-
959
- r1: a b c d
960
- r2: b c d a
961
- r3: c d a b
962
- r4: d a b c
963
-
964
- If we did the same in decryption mode we would get:
965
-
966
- r1: a d c b
967
- r2: b a d c
968
- r3: c b a d
969
- r4: d c b a
970
-
971
- If instead we swap d and b (set b=c3 and d=c1), then we get:
972
-
973
- r1: a b c d
974
- r2: d a b c
975
- r3: c d a b
976
- r4: b c d a
977
-
978
- Now the 1st and 3rd rows are the same as the encryption matrix. All
979
- we need to do then to make the mapping exactly the same is to swap
980
- the 2nd and 4th rows when in decryption mode. To do this without
981
- having to do it on each iteration, we swapped the 2nd and 4th rows
982
- in the decryption key schedule. We also have to do the swap above
983
- when we first pull in the input and when we set the final output. */
984
- a2 =
985
- m0[a >>> 24] ^
986
- m1[b >>> 16 & 255] ^
987
- m2[c >>> 8 & 255] ^
988
- m3[d & 255] ^ w[++i];
989
- b2 =
990
- m0[b >>> 24] ^
991
- m1[c >>> 16 & 255] ^
992
- m2[d >>> 8 & 255] ^
993
- m3[a & 255] ^ w[++i];
994
- c2 =
995
- m0[c >>> 24] ^
996
- m1[d >>> 16 & 255] ^
997
- m2[a >>> 8 & 255] ^
998
- m3[b & 255] ^ w[++i];
999
- d =
1000
- m0[d >>> 24] ^
1001
- m1[a >>> 16 & 255] ^
1002
- m2[b >>> 8 & 255] ^
1003
- m3[c & 255] ^ w[++i];
1004
- a = a2;
1005
- b = b2;
1006
- c = c2;
1007
- }
1008
-
1009
- /*
1010
- Encrypt:
1011
- SubBytes(state)
1012
- ShiftRows(state)
1013
- AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1])
1014
-
1015
- Decrypt:
1016
- InvShiftRows(state)
1017
- InvSubBytes(state)
1018
- AddRoundKey(state, w[0, Nb-1])
1019
- */
1020
- // Note: rows are shifted inline
1021
- output[0] =
1022
- (sub[a >>> 24] << 24) ^
1023
- (sub[b >>> 16 & 255] << 16) ^
1024
- (sub[c >>> 8 & 255] << 8) ^
1025
- (sub[d & 255]) ^ w[++i];
1026
- output[decrypt ? 3 : 1] =
1027
- (sub[b >>> 24] << 24) ^
1028
- (sub[c >>> 16 & 255] << 16) ^
1029
- (sub[d >>> 8 & 255] << 8) ^
1030
- (sub[a & 255]) ^ w[++i];
1031
- output[2] =
1032
- (sub[c >>> 24] << 24) ^
1033
- (sub[d >>> 16 & 255] << 16) ^
1034
- (sub[a >>> 8 & 255] << 8) ^
1035
- (sub[b & 255]) ^ w[++i];
1036
- output[decrypt ? 1 : 3] =
1037
- (sub[d >>> 24] << 24) ^
1038
- (sub[a >>> 16 & 255] << 16) ^
1039
- (sub[b >>> 8 & 255] << 8) ^
1040
- (sub[c & 255]) ^ w[++i];
1041
- }
1042
-
1043
- /**
1044
- * Deprecated. Instead, use:
1045
- *
1046
- * forge.cipher.createCipher('AES-<mode>', key);
1047
- * forge.cipher.createDecipher('AES-<mode>', key);
1048
- *
1049
- * Creates a deprecated AES cipher object. This object's mode will default to
1050
- * CBC (cipher-block-chaining).
1051
- *
1052
- * The key and iv may be given as a string of bytes, an array of bytes, a
1053
- * byte buffer, or an array of 32-bit words.
1054
- *
1055
- * @param options the options to use.
1056
- * key the symmetric key to use.
1057
- * output the buffer to write to.
1058
- * decrypt true for decryption, false for encryption.
1059
- * mode the cipher mode to use (default: 'CBC').
1060
- *
1061
- * @return the cipher.
1062
- */
1063
- function _createCipher(options) {
1064
- options = options || {};
1065
- var mode = (options.mode || 'CBC').toUpperCase();
1066
- var algorithm = 'AES-' + mode;
1067
-
1068
- var cipher;
1069
- if(options.decrypt) {
1070
- cipher = forge.cipher.createDecipher(algorithm, options.key);
1071
- } else {
1072
- cipher = forge.cipher.createCipher(algorithm, options.key);
1073
- }
1074
-
1075
- // backwards compatible start API
1076
- var start = cipher.start;
1077
- cipher.start = function(iv, options) {
1078
- // backwards compatibility: support second arg as output buffer
1079
- var output = null;
1080
- if(options instanceof forge.util.ByteBuffer) {
1081
- output = options;
1082
- options = {};
1083
- }
1084
- options = options || {};
1085
- options.output = output;
1086
- options.iv = iv;
1087
- start.call(cipher, options);
1088
- };
1089
-
1090
- return cipher;
1091
- }