To call sagemath program (jupyter notebook) from c program

asked 2020-11-08 14:01:11 +0200

Satyam gravatar image

Hi, Actually I am implementing an attack on cipher. For that I need some SAT computation. Since SAT computation can be done easily in SAGEMATH. So my program looks something like:

  1. I write some code in C
  2. Then I will pass some input to SAT i.e. to SAGEMATH (jupyter notebook)
  3. Take the output in C , verify
  4. Again run 1,2,3 for finite number of times.

I check SAGE documentation for a piece of Cython code but that worked for small example but the program gets complicated it returns some error. Can you guide me in this way or provide me some references? Which is faster calling sage from c OR calling c from sage jupyter notebook? Thanks for your help.

edit retag flag offensive close merge delete


Welcome to Ask Sage!

Thank you for your question!

slelievre gravatar imageslelievre ( 2021-01-01 17:48:17 +0200 )edit

Do you really need Sage or could you call a SAT solver directly, such as CryptoMiniSat?

Can you provide a baby example with actual code that people can try?

That could help others in trying to answer your question.

slelievre gravatar imageslelievre ( 2021-01-01 17:48:20 +0200 )edit