mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

14K
active users

#recursion

0 posts0 participants0 posts today

If 3-isogeny walks replace square roots with cube roots at equal cost, isn't security cubed not doubled? Is this efficiency or a security downgrade disguised as progress? 💥 #crypto #isogeny #recursion eprint.iacr.org/2025/691

IACR logo
IACR Cryptology ePrint Archive · Let us walk on the 3-isogeny graph: efficient, fast, and simpleConstructing and implementing isogeny-based cryptographic primitives is an active research. In particular, performing length-$n$ isogenies walks over quadratic field extensions of $\mathbb{F}_p$ plays an exciting role in some constructions, including Hash functions, Verifiable Delay Functions, Key-Encapsulation Mechanisms, and generic proof systems for isogeny knowledge. Remarkably, many isogeny-based constructions, for efficiency, perform $2$-isogenies through square root calculations. This work analyzes the idea of using $3$-isogenies instead of $2$-isogenies, which replaces the requirement of calculating square roots with cube roots. Performing length-$m$ $3$-isogenies allows shorter isogeny walks than when employing length-$n$ $2$-isogenies since a cube root calculation costs essentially the same as computing a square root, and we require $3^m \approx 2^n$ to provide the same security level. We propose an efficient mapping from arbitrary supersingular Montgomery curves defined over $\mathbb{F}_{p^2}$ to the $3$-isogeny curve model from Castryck, Decru, and Vercauteren (Asiacrypt 2020); a deterministic algorithm to compute all order-$3$ points on arbitrary supersingular Montgomery curves, and an efficient algorithm to compute length-$m$ $3$-isogeny chains. We improve the length-$m$ $3$-isogeny walks required by the KEM from Nakagawa and Onuki (CRYPTO 2024) by using our results and introducing more suitable parameter sets that are friendly with C-code implementations. In particular, our experiments illustrate an improvement of 26.41\%--35.60\% in savings when calculating length-$m$ $3$-isogeny chains and using our proposed parameters instead of those proposed by Nakagawa and Onuki (CRYPTO 2024). Finally, we enhance the key generation of $\mathsf{CTIDH}$-2048 by including radical $3$-isogeny chains over the basefield $\mathbb{F}_p$, reducing the overhead of finding a $3$-torsion basis as required in some instantiations of the $\mathsf{CSIDH}$ protocol. Our experiments illustrate the advantage of radical $3$ isogenies in the key generation of $\mathsf{CTIDH}$-2048, with an improvement close to 4x faster than the original $\mathsf{dCTIDH}$.
Replied in thread

@looopTools

Fair enough. Because recursion always has a limit, in any language, the tutorials probably assume you're aware of this already. The specific limit in Python is adjustable, but there's no way to eliminate it altogether.

Do the tutorials actually include data/examples that run into the recursion limit? Or is it only when applying code like that to other data that you run into issues?

I ask because the easiest way to smash the limit is to create a cyclic data structure, which is trivial in Python. If you naively recurse such an object, it goes on forever - until it hits the configured limit or the machine runs out of memory, anyways. i.e. this case:

>>> foo = ["bar"]
>>> foo.append(foo)
>>> foo
['bar', [...]]

If you think it's possible your recursion code might have to deal with something like this, you usually end up keeping track of the objects you've already processed, and skip them if you see the same object again (typically by the object ID).

In many cases, you can also rewrite recursive code so that it's not recursive, and cannot run into this problem. As a bonus, problems that can be refactored this way usually run faster without the recursion.

🥳 Oh wow, a 2023 #Java article using #ASM to dabble in tail call recursion—because who doesn't love a good #bytecode manipulation adventure, right? 📜 Pro tip: avoid #recursion altogether and save yourself from this academic exercise in "elegance." 🙄
unlinkedlist.org/2023/03/19/ta #tailcall #programming #tips #elegance #HackerNews #ngated

unlinkedlist.orgTail Call Recursion in Java with ASM – UnlinkedList

Here’s a crazy puzzle. Enjoy solving it and reply with your answer!

Imagine being in a large box with your box lying on the floor beside you. Your box contains a smaller copy of you and a smaller box inside and so on ad infinitum. You reach your hand into your box and pull out the smaller box. As you do this, you see a bigger hand coming from above and taking your box. Note that all the infinite copies of you have done the same. The boxes and the hands can pass through each other. So, there are no collisions.

Then, you put the box in your hand on the floor where your old box was. Where is your box now?

If you just want to read, I wrote my solution in a blog. What do you think?

Just BeingStrange paradoxes of recursive universes | Just BeingAn insane puzzle about universes within universes, simulations and reality

What is this kind of recursion called?

Where the recursive function can call itself from more than one of its branches?

---

(defun my-set-minus (a b)
(cond

( (null a) nil)
( (member (first a) b) (my-set-minus (cdr a) b))
( t (cons (first a) (my-set-minus (cdr a) b)) )

)
)

Mastering Recursion - DEV Community

The article presents recursion as a process of breaking down problems into self-replicating subproblems. The examples a easy to understand and nicely explained. However, the title "Mastering Recursion" feels is a bit too enthusiastic as the article only covers the basics.

dev.to/theyashsawarkar/masteri

DEV CommunityMastering Recursion: Think Like a Recursive Ninja! 🥷Recursion is like magic! 🪄 You solve a big problem by breaking it down into smaller versions of...