# Obfuscation शब्दावली

AfterPack के documentation की शब्दावली: polymorphism, non-materialization, reversal classes और बाकी सब, एक ही जगह परिभाषित।

Source: https://www.afterpack.dev/hi/docs/glossary

AfterPack का documentation इन शब्दों का उपयोग यहाँ परिभाषित अर्थों में करता है।

## दो अक्ष

AfterPack की सुरक्षा को दो स्वतंत्र अक्षों पर बताया जाता है: *एक* build को reverse करना कितना कठिन है, और अलग-अलग builds *एक-दूसरे से* कितनी अलग हैं। आप एक को बढ़ा सकते हैं, दूसरे को बढ़ाए बिना।

### Complexity

एक अकेली build को reverse करना कितना कठिन है: एक artifact के अंदर सुरक्षा की गहराई। इसे [`complexity`](#complexity) से सेट किया जाता है, सीधे या किसी [preset](https://www.afterpack.dev/hi/docs/presets#the-ladder) के ज़रिए।

### Per-build polymorphism

हर build पिछली से कितनी अलग है। [Seed](#seed) से तय होता है: engine config में [`seed`](https://www.afterpack.dev/hi/docs/config#seed), command line पर [`--seed`](https://www.afterpack.dev/hi/docs/config#seed)। यह AfterPack की मुख्य रक्षा है। हर build की बनावट अलग होती है, इसलिए एक build के patterns के लिए लिखे गए tools अगली build पर टूट जाते हैं। जो code चलाता है, वह अब भी उसकी values पढ़ सकता है। देखें [AfterPack कैसे काम करता है](https://www.afterpack.dev/hi/docs/concepts#a-new-program-every-build)।

## Configuration

### Preset

सुरक्षा settings का एक नामित समूह, जिसे [एक flag](https://www.afterpack.dev/hi/docs/config#preset) से चुना जाता है: `minify`, `light`, `medium`, `hard`, `extreme`। डिफ़ॉल्ट `light` है। एक preset का नाम [`complexity`](#complexity) target सेट करता है। हर पायदान जो target सेट करता है, वह [Presets](https://www.afterpack.dev/hi/docs/presets#the-ladder) पर है।

### complexity

Output में entanglement की मात्रा; देखें [Configuration](https://www.afterpack.dev/hi/docs/config#complexity)। इसकी कोई ऊपरी सीमा नहीं है। एक स्पष्ट [`inflation.max`](https://www.afterpack.dev/hi/docs/config#inflation-max) जो इसे रोकता है, build को विफल कर देता है; अगर सेट न हो, तो output कितना बढ़ेगा यह अकेले target तय करता है। हर preset के मान [Presets](https://www.afterpack.dev/hi/docs/presets#the-ladder) पर हैं।

### Directives

Source में लिखे [block](https://www.afterpack.dev/hi/docs/directives#writing-one) comments जो उस construct पर सुरक्षा बदलते हैं जिससे वे जुड़े हैं। Inline [`/* @afterpack preset=extreme */`](https://www.afterpack.dev/hi/docs/config#preset) अपने ठीक बाद वाले literal को कवर करता है। Block रूप, `/* @afterpack <key>=<value> */ … /* @afterpack end */`, अपनी लाइन पर अकेले marker से खुलता है और मेल खाने वाले `end` से बंद होता है, और एक स्पष्ट span को कवर करता है। `//` line comment scan नहीं किया जाता। [`skip`](https://www.afterpack.dev/hi/docs/config#skip) वहाँ सुरक्षा घटाता है जहाँ आपको compatibility चाहिए; [`preset=hard`](https://www.afterpack.dev/hi/docs/config#preset) या [`preset=extreme`](https://www.afterpack.dev/hi/docs/config#preset) इसे बढ़ाते हैं। केवल [Pro](https://www.afterpack.dev/hi/docs/pro) engine किसी region का पालन करता है; देखें [Free builds](https://www.afterpack.dev/hi/docs/directives#free-builds)। Free में किसी हिस्से को अलग रखने के लिए इसके बजाय [`paths.exclude`](https://www.afterpack.dev/hi/docs/config#paths-exclude) या [`identifiers.reserved`](https://www.afterpack.dev/hi/docs/config#identifiers-reserved) का उपयोग होता है। देखें [Directives](https://www.afterpack.dev/hi/docs/directives)।

### `preset=hard`

एक directive (`/* @afterpack preset=hard */`) जो किसी [region](https://www.afterpack.dev/hi/docs/directives#what-you-can-set) को [`complexity`](#complexity) 12 तक, यानी [`hard` पायदान](https://www.afterpack.dev/hi/docs/presets#the-ladder) तक उठाता है, और global preset चाहे जो हो, उस region के लिए [string floor](https://www.afterpack.dev/hi/docs/config#strings-encode) को ज़बरदस्ती चालू करता है। [`/* @afterpack preset=extreme */`](https://www.afterpack.dev/hi/docs/config#preset) यही काम target 25 पर करता है।

## Reversal और attacker model

### निश्चित संरचना

ऐसी बनावट जो builds के बीच एक जैसी रहती है: एक string array (चाहे encrypted हो), एक VM interpreter, हर build में हूबहू एक जैसा decoder bootstrap। `webcrack` जैसा tool, या कोई model, यही बनावट एक बार सीखता है और उसे साझा करने वाली हर build पर दोबारा इस्तेमाल करता है। कोई भी obfuscator build दर build constants बदल सकता है; मायने यह रखता है कि नीचे ऐसी बनावट बची है या नहीं। AfterPack अपनी बनावट, नाम, constants और layout हर build के [seed](#seed) से नए सिरे से लेता है, इसलिए एक build के patterns के लिए लिखा गया recognizer अगली build पर टूट जाता है। यह code चलाने वाले से values नहीं छिपाता। देखें [निश्चित obfuscation layers क्यों विफल होती हैं](https://www.afterpack.dev/hi/docs/concepts#why-fixed-obfuscation-layers-fail)।

### Reversal classes

तीन static-attacker classes जो बताती हैं कि bytes पढ़ने वाला, यानी grep, AST tooling, या code को execute न करने वाला blind LLM, अपने साथ क्या ले जाता है: renamed & encoded, flattened & fused, और destroyed & fused। Code चलाने वाला dynamic attacker एक अलग और ज़्यादा मज़बूत मामला है। Class तालिका और हर class से attacker को क्या मिलता है, यह [Reversal classes](https://www.afterpack.dev/hi/docs/reversal-classes) पर है। आज केवल पहली class, renamed & encoded, किसी shipped transform से बनती है; flattened & fused और destroyed & fused आरक्षित हैं।

### Non-materialization

वह mechanism जो एक secret को protect करता है, ऊपर की reversal classes से अलग, जो values के बजाय संरचना recover करती हैं। यह [`transforms.comparisonHardening.enabled`](https://www.afterpack.dev/hi/docs/config#transforms-kind-enabled) से मिलता है, जो string equality gate को एक one-way digest check में फिर से लिखता है ताकि literal artifact में मौजूद ही न रहे। यह [string floor](https://www.afterpack.dev/hi/docs/config#strings-encode) से अलग है, जो literal को encode तो करता है लेकिन उपयोग के समय उसे फिर से बना देता है। यह static reader और blind LLM को हराता है। यह उस attacker को नहीं हराता जो code को instrumented runtime में चलाता है; कोई भी build-time obfuscator इसे नहीं बदलता। देखें [Secrets कैसे बचे रहते हैं](https://www.afterpack.dev/hi/docs/concepts#how-secrets-survive)।

## Delivery, seed और tiers

### Seed

Build का वह parameter जो तय करता है कि कौन-सा polymorphic output बनेगा। डिफ़ॉल्ट रूप से random। यह कोई secret नहीं है: ship हुआ artifact वैसे भी public है, और किसी build का seed जानने से उसे reverse करने में मदद नहीं मिलती। Production में इसे हर release पर बदलें। इसे ([`--seed=git`](https://www.afterpack.dev/hi/docs/config#seed)) केवल तब pin करें जब आपको byte-identical output चाहिए, CI caching या reproducible audit के लिए। देखें [`seed`](https://www.afterpack.dev/hi/docs/config#seed) और [Builds & releases](https://www.afterpack.dev/hi/docs/builds)।

### Source maps

Mappings जो obfuscated output को आपके मूल source तक वापस जोड़ती हैं। Local debugging के लिए उपयोगी। Public `.map` attacker को आपके source तक सीधा रास्ता दे देता है। इसे कभी production में ship न करें। AfterPack [production](https://www.afterpack.dev/hi/docs/config#build-mode) build पर [source maps डिफ़ॉल्ट रूप से बंद रखता है](https://www.afterpack.dev/hi/docs/config#sourceMap-enabled), [`sourceMappingURL` comment](https://www.afterpack.dev/hi/docs/config#sourceMap-emitUrl) हटा देता है और आपके bundler के लिखे maps भी मिटा देता है।

### Protection Map

वह रिपोर्ट जो आपके source के हर token को उसके complexity score के आधार पर रंगती है और हर region की [reversal class](#reversal-classes) बताती है। डिफ़ॉल्ट रूप से engine तय करता है; [Pro](https://www.afterpack.dev/hi/docs/pro) पर [regions mark](https://www.afterpack.dev/hi/docs/directives) करने के बाद आप तय करते हैं। इसे [`protectionMap.enabled`](https://www.afterpack.dev/hi/docs/config#protectionMap-enabled) नियंत्रित करता है। देखें [Protection Map](https://www.afterpack.dev/hi/docs/protection-map), या [लाइव demo](https://www.afterpack.dev/protection-map-demo) खोलें।

### Tiers

Free, Extra MB, Indie, Team, Studio, [Enterprise](https://www.afterpack.dev/hi/docs/enterprise)। Free पूरी ताक़त वाली सुरक्षा पूरे bundle पर एक समान लागू करता है। Paid tiers किसी एक function या फ़ाइल पर [directive](https://www.afterpack.dev/hi/docs/directives) के ज़रिए ज़्यादा भारी या हल्का preset भी लगा सकते हैं। कीमतें, allowances और project सीमाएँ [Plans & tiers](https://www.afterpack.dev/hi/docs/tiers) पर हैं।

### Fail-closed

वह नियम कि Pro build कभी भी आपकी माँगी सुरक्षा से कमज़ोर सुरक्षा ship नहीं करती। अगर retry के बाद भी Pro cloud तक नहीं पहुँचा जा सकता, या batch के बीच में quota ख़त्म हो जाता है, तो AfterPack non-zero exit के साथ रुक जाता है। यह Free-tier या plaintext output पर वापस नहीं जाता। देखें [Exit codes & fail-closed](https://www.afterpack.dev/hi/docs/diagnostics#fail-closed-no-exceptions)।

## आगे

- [AfterPack कैसे काम करता है](https://www.afterpack.dev/hi/docs/concepts): जहाँ इनमें से ज़्यादातर शब्द संदर्भ में इस्तेमाल होते हैं।
- [Configuration](https://www.afterpack.dev/hi/docs/config): हर विकल्प, और कौन-सा रूप उसे सेट कर सकता है।
- [Directives](https://www.afterpack.dev/hi/docs/directives): पूरा `@afterpack` grammar और कौन-सी keys लागू होती हैं।
- [Presets](https://www.afterpack.dev/hi/docs/presets): वह सीढ़ी जिससे ऊपर के target मान आते हैं।
- [Diagnostics](https://www.afterpack.dev/hi/docs/diagnostics): वे `DIAG_*` codes जिनमें ये शब्द दिखते हैं।
