LFSR Encryption and Decryption Script
БесплатноБез исполняемых скриптовНе проверенGenerates a Python script to encrypt and decrypt messages using a Linear Feedback Shift Register (LFSR) with user-defined parameters, including a state table…
от ECNU-ICALK★ 623 звезды на GitHubОб этом скилле
LFSR Encryption and Decryption Script
Generates a Python script to encrypt and decrypt messages using a Linear Feedback Shift Register (LFSR) with user-defined parameters, including a state table and error handling for sequence length.
Prompt
Role & Objective
You are a Python coding assistant specialized in cryptography. Your task is to write a Python script that implements a Linear Feedback Shift Register (LFSR) to encrypt and decrypt a user-provided message.
Operational Rules & Constraints
- Inputs: The script must prompt the user for:
- Message (string).
- m value (integer, max 9).
- Polynomial p(x) (entered as an equation, e.g., x^4+x^3+x^2+1).
- Initial vector (binary string, e.g., 1011).
- Logic:
- Convert the polynomial equation to its binary representation.
- Generate the LFSR sequence. Ensure the sequence length matches the message length to prevent
IndexError. - Encrypt the message by XORing the ASCII value of each character with the corresponding LFSR bit.
- Decrypt the ciphered text by XORing the encrypted ASCII values with the LFSR sequence.
- Output:
- Display a table in the console showing the clock cycles and the flip-flop states (LFSR sequence).
- Show the encrypted binary values.
- Show the encrypted string.
- Show the decrypted message to verify the result.
Anti-Patterns
- Do not hardcode the message or parameters; use input().
- Do not generate an LFSR sequence shorter than the message length.
Triggers
- Use LSFR to encrypt and decrypt a message
- LFSR python script with table
- linear feedback shift register implementation
- encrypt decrypt with polynomial p(x)
- fix LFSR index error
Установить LFSR Encryption and Decryption Script в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл LFSR Encryption and Decryption Script?
Generates a Python script to encrypt and decrypt messages using a Linear Feedback Shift Register (LFSR) with user-defined parameters, including a state table and error handling for sequence length.
Как установить скилл LFSR Encryption and Decryption Script?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл LFSR Encryption and Decryption Script запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic