Skip to content

Conversation

@KutalVolkan
Copy link
Contributor

@KutalVolkan KutalVolkan commented Dec 8, 2025

Overview

This PR adds a new MathObfuscationConverter that transforms text into per-character algebraic identities (e.g., H = 4H – 3H). This enables evaluation of symbolic obfuscation attacks in red-teaming scenarios. The converter is fully plug-compatible with existing PyRIT prompt converter pipelines and includes a YAML seed prompt and example notebook.

Key Features

  • Character-level algebraic obfuscation
  • Built as a PromptConverter
  • Includes matching YAML seed prompt
  • Enables red-team evaluation of symbolic text obfuscation
  • Does not modify meaning; only hides characters

Related issue

closes #1230

@KutalVolkan KutalVolkan changed the title feat: add MathObfuscationConverter FEAT: add MathObfuscationConverter Dec 8, 2025
@KutalVolkan KutalVolkan changed the title FEAT: add MathObfuscationConverter [DRAFT] FEAT: add MathObfuscationConverter Dec 8, 2025
@romanlutz
Copy link
Contributor

romanlutz commented Dec 8, 2025

You'll need to add it to API reference, TOC file, and generate the .py file for the .ipynb

nvm on py file, see my other comment

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool! We usually don't have one notebook per converter but perhaps it could be added to 1_llm_converters?

Taking a step back... Couldn't this be done without LLMs?

@KutalVolkan
Copy link
Contributor Author

This is really cool! We usually don't have one notebook per converter but perhaps it could be added to 1_llm_converters?

Taking a step back... Couldn't this be done without LLMs?

Both yes, will finish it tomorrow :)

@KutalVolkan KutalVolkan changed the title [DRAFT] FEAT: add MathObfuscationConverter FEAT: add MathObfuscationConverter Dec 9, 2025
@KutalVolkan
Copy link
Contributor Author

Hello @romanlutz,

I replaced the LLM approach like you suggested. I got carried away with using LLMs for everything, even when we don't need them for a given use case :)

I also contacted the author Edward Morris and Mike Takahashi, who published the jailbreak on LinkedIn, to see if they want other jailbreaks implemented in PyRIT, etc.

Question for you: do we want to provide notebooks, or just the converter and pytest?

@romanlutz
Copy link
Contributor

Nice! It all looks very good. The API reference update is missing, though. I think we've been moving away from having a notebook per converter and instead show some of them in 0_converters.ipynb (non-LLM) or 1_llm_converters.ipynb (LLM). I could see a point in making that a lot more comprehensive and listing as many as possible so that people can discover them more easily. @rlundeen2 may have thoughts. There are many other categories, of course, which have their own files (video, image, audio, etc.). But text-input text-output non-LLM converters could all be listed in 0_converters.ipynb if you ask me.

@romanlutz romanlutz self-assigned this Dec 9, 2025
Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@romanlutz romanlutz merged commit 0c56a1b into Azure:main Dec 10, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Math Variable Obfuscation Converter

2 participants