# Implementing SecAggPlus into my Flower for both simulation and production scenarios

**URL:** <https://discuss.flower.ai/t/implementing-secaggplus-into-my-flower-for-both-simulation-and-production-scenarios/111>\
**Category:** Flower Help - Intermediate\
**Tags:** security\
**Created:** [February 28, 2024, 5:10pm UTC](https://discuss.flower.ai/t/implementing-secaggplus-into-my-flower-for-both-simulation-and-production-scenarios/111 "2024-02-28T17:10:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flower](https://dub1.discourse-cdn.com/flex013/user_avatar/discuss.flower.ai/flower/32/17_2.png) [@flower](https://discuss.flower.ai/u/flower)\
**Post date:** [February 28, 2024, 5:10pm UTC](https://discuss.flower.ai/t/implementing-secaggplus-into-my-flower-for-both-simulation-and-production-scenarios/111/1 "2024-02-28T17:10:37Z")

</div>

_This question was migrated from the Slack channel [#questions](https://friendly-flower.slack.com/archives/C01RM6LMKQA/p1707975124216349)._

**Original Question:**  
Hello, I am trying to implement SecAggPlus into my Flower for both simulation and production scenarios. From this code example [flower/examples/secaggplus-mt/client.py at main · adap/flower · GitHub](https://github.com/adap/flower/blob/main/examples/secaggplus-mt/client.py) → they used the `secaggplus_mod` from `flwr.client.mod`, which is paired with:

```auto
app = fl.client.ClientApp(
    client_fn=client_fn,
    mods=[secaggplus_mod],
    )

```

From what I understand ClientApp is paired with the driver.py for long running server. So, just wondering if anyone have any advice on how else can I implement SecAgg for simulation under (`start_simulation()`) and for production under (`start_server()`)

In addition, I am aware of this SecAggPlus protocol, but I am unsure of how I can integrate this into Flower Federated Learning. So I would be grateful if anyone with experience can help. Thank you in advance! [Flower Framework main](https://flower.ai/docs/framework/contributor-ref-secure-aggregation-protocols.html)

* * *

**Answer:**  
Hi!  
Re: SA simulation. The new features, including mods, are not yet compatible with the simulation engine, and hence we didn’t advertise the secaggplus example you used (but likely we will fix it within a month). If you want to use the example, please follow the read me file in the example. And you may also check the `run.sh` if you are interested in how to manually run the example.

Re: SecAggPlus protocol on the doc page, it’s out-dated. Thanks for bringing this up, we will update the page soon.
